Class FilteredAttributes

java.lang.Object
io.opentelemetry.sdk.metrics.internal.view.FilteredAttributes
All Implemented Interfaces:
Attributes
Direct Known Subclasses:
FilteredAttributes.RegularFilteredAttributes, FilteredAttributes.SmallFilteredAttributes

abstract class FilteredAttributes extends Object implements Attributes
Filtered attributes is a filtered view of a ImmutableKeyValuePairs backed Attributes instance. Rather than creating an entirely new attributes instance, it keeps track of which source attributes are excluded while implementing the Attributes interface.

Notably, the equals(Object) and hashCode() depend on comparison against other FilteredAttributes instances. This means that where FilteredAttributes is used for things like map keys, it must be used for all keys in that map. You cannot mix Attributes implementations. This is also true for the default attributes implementation.

  • Field Details

    • sourceData

      private final Object[] sourceData
    • hashcode

      private final int hashcode
    • size

      private final int size
  • Constructor Details

    • FilteredAttributes

      private FilteredAttributes(Object[] sourceData, int hashcode, int size)
  • Method Details