gRPC instrumentation: client additions#269
Merged
codeboten merged 13 commits intoopen-telemetry:mainfrom Feb 5, 2021
Merged
Conversation
9bd9b7d to
6fc7f26
Compare
Contributor
Author
|
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. |
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
Contributor
Author
|
The docker error in the tests seems entirely unrelated to the changes made in this PR, does anyone know how to fix? |
Contributor
I am investigating it 🔎 |
Contributor
Author
Thanks! |
ocelotl
approved these changes
Feb 5, 2021
| # handle legacy argument | ||
| if "channel_type" in kwargs: | ||
| if kwargs.get("channel_type") == "secure": | ||
| return ("secure_channel",) |
Contributor
There was a problem hiding this comment.
Are you sure you want to return different types (tuple or list)?
Contributor
Author
There was a problem hiding this comment.
Oh! I didn't even realize. I'll fix it, good catch.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.