-
Notifications
You must be signed in to change notification settings - Fork 495
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 service.instance.id with Pod name #2678
Add service.instance.id with Pod name #2678
Conversation
Could you please submit some unit tests for this PR? |
It would be nice to see this in e2e tests |
Could you please include it in the changelog? |
I have a few more internal details that I'm validating but I plan to get back on this soon, maybe this or next week I hope |
Marking this as a draft, I plan to get back on this and a few other issues soon after some internal migration. |
12b7786
to
66cf88b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change itself looks good to me. For consistency, I think this logic should be moved into the injectCommonSDKConfig
function, where we handle these kinds of cases. I'd also like to see a unit test checking it.
@swiatekm-sumo hum moving would be a bit hard I guess since it would refac a few things 🤔 About the test, I've fixed/adjusted the other tests to consider the new attributes I guess in some ways they cover it already Do you see some other test/adjustment that should be done? |
@yuriolisa @pavolloffay @swiatekm-sumo I'll create the changelog soon. So after the final change I close with the changelog. |
Signed-off-by: Janario Oliveira <janario.oliveira@gmail.com>
Signed-off-by: Janario Oliveira <janario.oliveira@gmail.com>
Signed-off-by: Janario Oliveira <janario.oliveira@gmail.com>
Signed-off-by: Janario Oliveira <janario.oliveira@gmail.com>
4b6b09b
to
b42f7c6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this looks good... @janario testing locally could you send some screenshots of new relic (or something else) showing this working as intended?
Sure, By default without the attribute it doesn't show the JVM view of a service: After having it starts to work: In the end we were under evaluation between Newrelic and other options, and we choose for another option :-) |
@pavolloffay did you have a chance to review this one? :-) |
hi |
* Add service.instance.id with Pod name * Add e2e assert Signed-off-by: Janario Oliveira <janario.oliveira@gmail.com> * Fix tests Signed-off-by: Janario Oliveira <janario.oliveira@gmail.com> * Remove unnecessary `service.name` Signed-off-by: Janario Oliveira <janario.oliveira@gmail.com> * Rename var `someNamespace` - > `testNamespace` Signed-off-by: Janario Oliveira <janario.oliveira@gmail.com> * Fix tests Signed-off-by: Janario Oliveira <janario.oliveira@gmail.com> * Add changelog Signed-off-by: Janario Oliveira <janario.oliveira@gmail.com> --------- Signed-off-by: Janario Oliveira <janario.oliveira@gmail.com>
* Add service.instance.id with Pod name * Add e2e assert Signed-off-by: Janario Oliveira <janario.oliveira@gmail.com> * Fix tests Signed-off-by: Janario Oliveira <janario.oliveira@gmail.com> * Remove unnecessary `service.name` Signed-off-by: Janario Oliveira <janario.oliveira@gmail.com> * Rename var `someNamespace` - > `testNamespace` Signed-off-by: Janario Oliveira <janario.oliveira@gmail.com> * Fix tests Signed-off-by: Janario Oliveira <janario.oliveira@gmail.com> * Add changelog Signed-off-by: Janario Oliveira <janario.oliveira@gmail.com> --------- Signed-off-by: Janario Oliveira <janario.oliveira@gmail.com>
Description:
I'm using newrelic with opentelemetry and according to their documentation they rely on the
service.instance.id
to group jvm metrics.https://opentelemetry.io/docs/specs/semconv/resource/#service-experimental
After a few explorations, I noticed that this was expected here open-telemetry/semantic-conventions#312
But while the pod is being created it may not have a name yet, which results on an absent property.
This PR will change it to be more dynamic at runtime.
Link to tracking Issue(s):
Testing:
Documentation:
https://github.com/open-telemetry/semantic-conventions/blob/main/docs/attributes-registry/service.md