Skip to content

Commit

Permalink
[pinpoint-apm#8945] Add ElasticSearch Annotation to type-provider
Browse files Browse the repository at this point in the history
  • Loading branch information
emeroad committed Jun 23, 2022
1 parent cdabbee commit 9cec2e9
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
package com.navercorp.pinpoint.plugin.elasticsearch;

import com.navercorp.pinpoint.common.trace.AnnotationKey;
import com.navercorp.pinpoint.common.trace.AnnotationKeyFactory;
import com.navercorp.pinpoint.common.trace.AnnotationKeyProperty;
import com.navercorp.pinpoint.common.trace.AnnotationKeyProvider;
import com.navercorp.pinpoint.common.trace.ServiceType;
import com.navercorp.pinpoint.common.trace.ServiceTypeProvider;

Expand All @@ -25,8 +24,8 @@
*/
public class ElasticsearchConstants {

public static final AnnotationKey ARGS_DSL_ANNOTATION_KEY = AnnotationKeyFactory.of(173, "es.dsl", AnnotationKeyProperty.VIEW_IN_RECORD_SET);
public static final AnnotationKey ARGS_VERSION_ANNOTATION_KEY = AnnotationKeyFactory.of(176, "es.version", AnnotationKeyProperty.VIEW_IN_RECORD_SET);
public static final AnnotationKey ARGS_DSL_ANNOTATION_KEY = AnnotationKeyProvider.getByCode(173);
public static final AnnotationKey ARGS_VERSION_ANNOTATION_KEY = AnnotationKeyProvider.getByCode(176);

public static final ServiceType ELASTICSEARCH = ServiceTypeProvider.getByName("ELASTICSEARCH");
public static final ServiceType ELASTICSEARCH_EXECUTOR = ServiceTypeProvider.getByName("ELASTICSEARCH_HIGHLEVEL_CLIENT");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,13 @@ serviceTypes:
# matcher:
# type: 'exact'
# code: 40 # http.url

annotationKeys:
- code: 173
name: 'es.dsl'
property:
viewInRecordSet: true
- code: 176
name: 'es.version'
property:
viewInRecordSet: true
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,14 @@
package com.navercorp.pinpoint.plugin.elasticsearch8;

import com.navercorp.pinpoint.common.trace.AnnotationKey;
import com.navercorp.pinpoint.common.trace.AnnotationKeyFactory;
import com.navercorp.pinpoint.common.trace.AnnotationKeyProperty;
import com.navercorp.pinpoint.common.trace.AnnotationKeyProvider;
import com.navercorp.pinpoint.common.trace.ServiceType;
import com.navercorp.pinpoint.common.trace.ServiceTypeProvider;

public class Elasticsearch8Constants {

public static final AnnotationKey ARGS_DSL_ANNOTATION_KEY = AnnotationKeyFactory.of(177, "es8.dsl", AnnotationKeyProperty.VIEW_IN_RECORD_SET);
public static final AnnotationKey ARGS_VERSION_ANNOTATION_KEY = AnnotationKeyFactory.of(178, "es8.version", AnnotationKeyProperty.VIEW_IN_RECORD_SET);
public static final AnnotationKey ARGS_DSL_ANNOTATION_KEY = AnnotationKeyProvider.getByCode(177);
public static final AnnotationKey ARGS_VERSION_ANNOTATION_KEY = AnnotationKeyProvider.getByCode(178);

public static final ServiceType ELASTICSEARCH = ServiceTypeProvider.getByName("ELASTICSEARCH8");
public static final ServiceType ELASTICSEARCH_EXECUTOR = ServiceTypeProvider.getByName("ELASTICSEARCH8_CLIENT");
Expand Down

0 comments on commit 9cec2e9

Please sign in to comment.