-
Notifications
You must be signed in to change notification settings - Fork 624
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
gRPC instrumentation: client additions #269
gRPC instrumentation: client additions #269
Conversation
9bd9b7d
to
6fc7f26
Compare
Is there anything you need me to do to help the process along here? This gRPC part of this is not really usable as-is, and I'd like to help with other things, but I'm blocked by these PRs. |
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.
Code changes LGTM
Add tests for the new attributes
Bugfix for docs that led me astray for a good half hour :)
The docs on metric labels suggests that they should probably be strings, and all others I can find are strings, and so these ought to be also. Otherwise, some of the exporters/processors have to handle things specifically, and not all of these come out as nice as could be when you `str()` them. I've also made sure to use the `StatusCode` name, as that's the interesting thing. Finally, there's no need to report specifically that `error=false`, so I've removed that tag.
Hey, good thing there are tests. Also, I did the `sorted()` thing in here so future us don't have to think about the ordering of these when writing new tests :)
This code passed before, so something clearly changed.
b8ffce6
to
abda221
Compare
The docker error in the tests seems entirely unrelated to the changes made in this PR, does anyone know how to fix? |
I am investigating it 🔎 |
Thanks! |
# handle legacy argument | ||
if "channel_type" in kwargs: | ||
if kwargs.get("channel_type") == "secure": | ||
return ("secure_channel",) |
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.
Are you sure you want to return different types (tuple or list)?
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.
Oh! I didn't even realize. I'll fix it, good catch.
Description
Updates the gRPC client instrumentation:
Re: the instrumentation call - I preserved the existing parameter so as to not break changes, but we may wish to mark that as deprecated, I don't know the convention with this library on how to do that.
Fixes #256
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
I've added new checks in the existing tests to make sure the attributes
Does This PR Require a Core Repo Change?
Checklist:
See contributing.md for styleguide, changelog guidelines, and more.