Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add instrumentation tags to grpc metrics #1081

Conversation

stanley-cheung
Copy link
Collaborator

@stanley-cheung stanley-cheung commented Mar 27, 2024

Add two tags to the A66 metrics exported by the MetricsStreamTracers

  'instrumentation_source': 'grpc-spring'
  'instrumentation_version': {current project version}

@stanley-cheung
Copy link
Collaborator Author

stanley-cheung commented Mar 28, 2024

[ 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 stanley-cheung marked this pull request as draft March 28, 2024 20:30
@stanley-cheung
Copy link
Collaborator Author

Some more work to be done...

@stanley-cheung stanley-cheung marked this pull request as ready for review March 28, 2024 21:13
@ST-DDT
Copy link
Collaborator

ST-DDT commented Mar 29, 2024

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
Copy link
Collaborator Author

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.

Copy link
Collaborator

@ST-DDT ST-DDT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure whether the tags should be included for everyone.
But implementation wise this looks good to me.
(Spring has a bean for adding tags to metrics).

Copy link
Collaborator

@DNVindhya DNVindhya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@stanley-cheung stanley-cheung merged commit 8239f8a into grpc-ecosystem:master Apr 1, 2024
1 check passed
@stanley-cheung stanley-cheung deleted the add-instrumentation-metric-tag branch April 1, 2024 22:50
@yidongnan yidongnan added this to the 3.1.0 milestone Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants