Package co.elastic.apm.agent.metrics
Interface Labels
-
- All Known Implementing Classes:
Labels.AbstractBase,Labels.Immutable,Labels.Mutable
public interface LabelsLabels are key/value pairs and relate to ECS labels. However, there are also top-level labels which are not nested under thelabelsobject, for examplegetTransactionName(),getTransactionType(),getSpanType()andgetSpanSubType().Metrics are structured into multiple
MetricSets. For each distinct combination ofLabels, there is oneMetricSet.Labels allow for
CharSequences as a value, thus avoiding allocations fortransaction.name.toString()when tracking breakdown metrics for a transaction. Iterations over the labels also don't allocate an Iterator, in contrast toMap.entrySet().iterator().
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classLabels.AbstractBasestatic classLabels.ImmutableAn immutable implementation of theLabelsinterfacestatic classLabels.Mutable
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringgetKey(int i)java.util.List<java.lang.String>getKeys()java.lang.StringgetSpanSubType()java.lang.StringgetSpanType()java.lang.CharSequencegetTransactionName()java.lang.StringgetTransactionType()java.lang.CharSequencegetValue(int i)java.util.List<java.lang.CharSequence>getValues()Labels.ImmutableimmutableCopy()booleanisEmpty()intsize()
-
-
-
Field Detail
-
EMPTY
static final Labels EMPTY
-
-
Method Detail
-
getTransactionName
@Nullable java.lang.CharSequence getTransactionName()
-
getTransactionType
@Nullable java.lang.String getTransactionType()
-
getSpanType
@Nullable java.lang.String getSpanType()
-
getSpanSubType
@Nullable java.lang.String getSpanSubType()
-
getKeys
java.util.List<java.lang.String> getKeys()
-
getValues
java.util.List<java.lang.CharSequence> getValues()
-
isEmpty
boolean isEmpty()
-
size
int size()
-
getKey
java.lang.String getKey(int i)
-
getValue
java.lang.CharSequence getValue(int i)
-
immutableCopy
Labels.Immutable immutableCopy()
-
-