55
66package io .opentelemetry .javaagent .instrumentation .elasticsearch .transport ;
77
8+ import static io .opentelemetry .api .common .AttributeKey .longKey ;
9+ import static io .opentelemetry .api .common .AttributeKey .stringKey ;
10+
811import io .opentelemetry .api .common .AttributeKey ;
912import io .opentelemetry .api .common .AttributesBuilder ;
1013import io .opentelemetry .context .Context ;
@@ -24,41 +27,38 @@ public class ElasticsearchTransportExperimentalAttributesExtractor
2427 implements AttributesExtractor <ElasticTransportRequest , ActionResponse > {
2528
2629 private static final AttributeKey <String > ELASTICSEARCH_ACTION =
27- AttributeKey . stringKey ("elasticsearch.action" );
30+ stringKey ("elasticsearch.action" );
2831 private static final AttributeKey <String > ELASTICSEARCH_REQUEST =
29- AttributeKey . stringKey ("elasticsearch.request" );
32+ stringKey ("elasticsearch.request" );
3033 private static final AttributeKey <String > ELASTICSEARCH_REQUEST_INDICES =
31- AttributeKey . stringKey ("elasticsearch.request.indices" );
34+ stringKey ("elasticsearch.request.indices" );
3235 private static final AttributeKey <String > ELASTICSEARCH_REQUEST_SEARCH_TYPES =
33- AttributeKey .stringKey ("elasticsearch.request.search.types" );
34- private static final AttributeKey <String > ELASTICSEARCH_TYPE =
35- AttributeKey .stringKey ("elasticsearch.type" );
36- private static final AttributeKey <String > ELASTICSEARCH_ID =
37- AttributeKey .stringKey ("elasticsearch.id" );
38- private static final AttributeKey <Long > ELASTICSEARCH_VERSION =
39- AttributeKey .longKey ("elasticsearch.version" );
36+ stringKey ("elasticsearch.request.search.types" );
37+ private static final AttributeKey <String > ELASTICSEARCH_TYPE = stringKey ("elasticsearch.type" );
38+ private static final AttributeKey <String > ELASTICSEARCH_ID = stringKey ("elasticsearch.id" );
39+ private static final AttributeKey <Long > ELASTICSEARCH_VERSION = longKey ("elasticsearch.version" );
4040 private static final AttributeKey <Long > ELASTICSEARCH_SHARD_BROADCAST_TOTAL =
41- AttributeKey . longKey ("elasticsearch.shard.broadcast.total" );
41+ longKey ("elasticsearch.shard.broadcast.total" );
4242 private static final AttributeKey <Long > ELASTICSEARCH_SHARD_BROADCAST_SUCCESSFUL =
43- AttributeKey . longKey ("elasticsearch.shard.broadcast.successful" );
43+ longKey ("elasticsearch.shard.broadcast.successful" );
4444 private static final AttributeKey <Long > ELASTICSEARCH_SHARD_BROADCAST_FAILED =
45- AttributeKey . longKey ("elasticsearch.shard.broadcast.failed" );
45+ longKey ("elasticsearch.shard.broadcast.failed" );
4646 private static final AttributeKey <Long > ELASTICSEARCH_SHARD_REPLICATION_TOTAL =
47- AttributeKey . longKey ("elasticsearch.shard.replication.total" );
47+ longKey ("elasticsearch.shard.replication.total" );
4848 private static final AttributeKey <Long > ELASTICSEARCH_SHARD_REPLICATION_SUCCESSFUL =
49- AttributeKey . longKey ("elasticsearch.shard.replication.successful" );
49+ longKey ("elasticsearch.shard.replication.successful" );
5050 private static final AttributeKey <Long > ELASTICSEARCH_SHARD_REPLICATION_FAILED =
51- AttributeKey . longKey ("elasticsearch.shard.replication.failed" );
51+ longKey ("elasticsearch.shard.replication.failed" );
5252 private static final AttributeKey <Long > ELASTICSEARCH_RESPONSE_STATUS =
53- AttributeKey . longKey ("elasticsearch.response.status" );
53+ longKey ("elasticsearch.response.status" );
5454 private static final AttributeKey <Long > ELASTICSEARCH_SHARD_BULK_ID =
55- AttributeKey . longKey ("elasticsearch.shard.bulk.id" );
55+ longKey ("elasticsearch.shard.bulk.id" );
5656 private static final AttributeKey <String > ELASTICSEARCH_SHARD_BULK_INDEX =
57- AttributeKey . stringKey ("elasticsearch.shard.bulk.index" );
57+ stringKey ("elasticsearch.shard.bulk.index" );
5858 private static final AttributeKey <Long > ELASTICSEARCH_NODE_FAILURES =
59- AttributeKey . longKey ("elasticsearch.node.failures" );
59+ longKey ("elasticsearch.node.failures" );
6060 private static final AttributeKey <String > ELASTICSEARCH_NODE_CLUSTER_NAME =
61- AttributeKey . stringKey ("elasticsearch.node.cluster.name" );
61+ stringKey ("elasticsearch.node.cluster.name" );
6262
6363 @ Override
6464 public void onStart (
0 commit comments