grpc-ecosystem / grpc-spring

Spring Boot starter module for gRPC framework.
https://grpc-ecosystem.github.io/grpc-spring/
Apache License 2.0
3.41k stars 808 forks source link

Add instrumentation tags to grpc metrics #1081

Closed stanley-cheung closed 3 months ago

stanley-cheung commented 3 months ago

Add two tags to the A66 metrics exported by the MetricsStreamTracers

  'instrumentation_source': 'grpc-spring'
  'instrumentation_version': {current project version}
stanley-cheung commented 3 months ago

[ EDIT: the following error has been fixed. ]

$ ./gradlew publishToMavenLocal

> Task :grpc-common-spring-boot:sourcesJar FAILED

FAILURE: Build failed with an exception.

* What went wrong:
A problem was found with the configuration of task ':grpc-common-spring-boot:sourcesJar' (type 'Jar').
  - Gradle detected a problem with the following location: '/usr/local/google/home/stanleycheung/grpc-spring/grpc-common-spring-boot/src/main/java'.

    Reason: Task ':grpc-common-spring-boot:sourcesJar' uses this output of task ':createVersionsFile' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.

    Possible solutions:
      1. Declare task ':createVersionsFile' as an input of ':grpc-common-spring-boot:sourcesJar'.
      2. Declare an explicit dependency on ':createVersionsFile' from ':grpc-common-spring-boot:sourcesJar' using Task#dependsOn.
      3. Declare an explicit dependency on ':createVersionsFile' from ':grpc-common-spring-boot:sourcesJar' using Task#mustRunAfter.
stanley-cheung commented 3 months ago

Some more work to be done...

ST-DDT commented 3 months ago

Add two tags to the A66 metrics exported by the MetricsStreamTracers

I haven't found a reason why these tags should be included. Is it part of the spec?

stanley-cheung commented 3 months ago

Add two tags to the A66 metrics exported by the MetricsStreamTracers

I haven't found a reason why these tags should be included. Is it part of the spec?

Yes this is part of an internal spec that will help us distinguish where the metrics originate.