From 7eae3dafe36a2d0ccec7d6a26dc8c1d82b12d98f Mon Sep 17 00:00:00 2001 From: Felix Barnsteiner Date: Tue, 28 Apr 2020 13:06:41 +0200 Subject: [PATCH 1/3] Include grpc plugin in agent jar --- CHANGELOG.asciidoc | 1 + docs/supported-technologies.asciidoc | 5 +++-- elastic-apm-agent/pom.xml | 5 +++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 9114bcae94..0b7d920c0d 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -46,6 +46,7 @@ This is not a breaking change, so former * Fix side effect of calling `Statement.getUpdateCount` more than once {pull}1139[#1139] * Stop capturing JDBC affected rows count using `Statement.getUpdateCount` to prevent unreliable side-effects {pull}1147[#1147] * Fix OpenTracing error tag handling (set transaction error result when tag value is `true`) {pull}1159[#1159] +* Due to a bug in the build we didn't include the gRPC plugin in the build so far [[release-notes-1.x]] diff --git a/docs/supported-technologies.asciidoc b/docs/supported-technologies.asciidoc index 83607e6a7c..699021de9c 100644 --- a/docs/supported-technologies.asciidoc +++ b/docs/supported-technologies.asciidoc @@ -407,8 +407,9 @@ When doing so, the ID corresponding the captured error (`error.id`) is added to | gRPC | 1.6.1+ -| Client (synchronous & asynchronous) & Server instrumentation -| 1.14.0 +| Client (synchronous & asynchronous) & Server instrumentation. + Streaming calls are currently not instrumented. +| 1.16.0 |=== diff --git a/elastic-apm-agent/pom.xml b/elastic-apm-agent/pom.xml index d7af3a35c7..b7f6113859 100644 --- a/elastic-apm-agent/pom.xml +++ b/elastic-apm-agent/pom.xml @@ -124,6 +124,11 @@ apm-es-restclient-plugin-6_4 ${project.version} + + ${project.groupId} + apm-grpc-plugin + ${project.version} + ${project.groupId} apm-kafka-base-plugin From aec230ac0bb677e5ae97ad42b4159803e6dc0f09 Mon Sep 17 00:00:00 2001 From: Sylvain Juge Date: Tue, 28 Apr 2020 14:50:31 +0200 Subject: [PATCH 2/3] don't refer to grpc types from bootstrap classloader --- .../elastic/apm/agent/grpc/ClientCallImplInstrumentation.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apm-agent-plugins/apm-grpc/apm-grpc-plugin/src/main/java/co/elastic/apm/agent/grpc/ClientCallImplInstrumentation.java b/apm-agent-plugins/apm-grpc/apm-grpc-plugin/src/main/java/co/elastic/apm/agent/grpc/ClientCallImplInstrumentation.java index bee99f50bd..0f768af750 100644 --- a/apm-agent-plugins/apm-grpc/apm-grpc-plugin/src/main/java/co/elastic/apm/agent/grpc/ClientCallImplInstrumentation.java +++ b/apm-agent-plugins/apm-grpc/apm-grpc-plugin/src/main/java/co/elastic/apm/agent/grpc/ClientCallImplInstrumentation.java @@ -105,7 +105,7 @@ public Constructor(ElasticApmTracer tracer) { @Override public ElementMatcher getMethodMatcher() { - return isConstructor().and(takesArgument(0, MethodDescriptor.class)); + return isConstructor().and(takesArgument(0, named("io.grpc.MethodDescriptor"))); } @Advice.OnMethodEnter(suppress = Throwable.class) From c6b46cd63fc996f602ba27936c9de1247f36836b Mon Sep 17 00:00:00 2001 From: Sylvain Juge Date: Tue, 28 Apr 2020 15:56:02 +0200 Subject: [PATCH 3/3] update generated doc --- docs/configuration.asciidoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/configuration.asciidoc b/docs/configuration.asciidoc index 03a372f48d..6f69e29bc4 100644 --- a/docs/configuration.asciidoc +++ b/docs/configuration.asciidoc @@ -665,7 +665,7 @@ you should add an additional entry to this list (make sure to also include the d ==== `disable_instrumentations` (added[1.0.0,Changing this value at runtime is possible since version 1.15.0]) A list of instrumentations which should be disabled. -Valid options are `annotations`, `apache-commons-exec`, `apache-httpclient`, `asynchttpclient`, `concurrent`, `elasticsearch-restclient`, `exception-handler`, `executor`, `experimental`, `hibernate-search`, `http-client`, `jax-rs`, `jax-ws`, `jdbc`, `jedis`, `jms`, `jsf`, `kafka`, `lettuce`, `log4j`, `logging`, `mongodb-client`, `mule`, `okhttp`, `opentracing`, `process`, `public-api`, `quartz`, `redis`, `redisson`, `render`, `scheduled`, `servlet-api`, `servlet-api-async`, `servlet-input-stream`, `slf4j`, `spring-mvc`, `spring-resttemplate`, `spring-service-name`, `spring-view-render`, `urlconnection`. +Valid options are `annotations`, `apache-commons-exec`, `apache-httpclient`, `asynchttpclient`, `concurrent`, `elasticsearch-restclient`, `exception-handler`, `executor`, `experimental`, `grpc`, `hibernate-search`, `http-client`, `jax-rs`, `jax-ws`, `jdbc`, `jedis`, `jms`, `jsf`, `kafka`, `lettuce`, `log4j`, `logging`, `mongodb-client`, `mule`, `okhttp`, `opentracing`, `process`, `public-api`, `quartz`, `redis`, `redisson`, `render`, `scheduled`, `servlet-api`, `servlet-api-async`, `servlet-input-stream`, `slf4j`, `spring-mvc`, `spring-resttemplate`, `spring-service-name`, `spring-view-render`, `urlconnection`. If you want to try out experimental features, set the value to an empty string. NOTE: Changing this value at runtime can slow down the application temporarily. @@ -2376,7 +2376,7 @@ The default unit for this option is `ms`. # sanitize_field_names=password,passwd,pwd,secret,*key,*token*,*session*,*credit*,*card*,authorization,set-cookie # A list of instrumentations which should be disabled. -# Valid options are `annotations`, `apache-commons-exec`, `apache-httpclient`, `asynchttpclient`, `concurrent`, `elasticsearch-restclient`, `exception-handler`, `executor`, `experimental`, `hibernate-search`, `http-client`, `jax-rs`, `jax-ws`, `jdbc`, `jedis`, `jms`, `jsf`, `kafka`, `lettuce`, `log4j`, `logging`, `mongodb-client`, `mule`, `okhttp`, `opentracing`, `process`, `public-api`, `quartz`, `redis`, `redisson`, `render`, `scheduled`, `servlet-api`, `servlet-api-async`, `servlet-input-stream`, `slf4j`, `spring-mvc`, `spring-resttemplate`, `spring-service-name`, `spring-view-render`, `urlconnection`. +# Valid options are `annotations`, `apache-commons-exec`, `apache-httpclient`, `asynchttpclient`, `concurrent`, `elasticsearch-restclient`, `exception-handler`, `executor`, `experimental`, `grpc`, `hibernate-search`, `http-client`, `jax-rs`, `jax-ws`, `jdbc`, `jedis`, `jms`, `jsf`, `kafka`, `lettuce`, `log4j`, `logging`, `mongodb-client`, `mule`, `okhttp`, `opentracing`, `process`, `public-api`, `quartz`, `redis`, `redisson`, `render`, `scheduled`, `servlet-api`, `servlet-api-async`, `servlet-input-stream`, `slf4j`, `spring-mvc`, `spring-resttemplate`, `spring-service-name`, `spring-view-render`, `urlconnection`. # If you want to try out experimental features, set the value to an empty string. # # NOTE: Changing this value at runtime can slow down the application temporarily.