-
Notifications
You must be signed in to change notification settings - Fork 599
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
Adds user agent string to grpc headers #3009
Conversation
|
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.
Looks good to me overall. You also need to add unit tests.
@srikanthccv Thanks for the review; I am working on tests. |
Hi @srikanthccv, Can you give me a small cue as to how I add a test and run it? Should I add a line below this and something like this? Thanks in advance. |
You could add an another assert statement in this test which checks that user-agent header is there. You need to do this for all three exporters. |
11bc504
to
7cc7b9c
Compare
@srikanthccv Please take a look. |
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.
Please resolve the merge conflicts and address the comments
...pentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/__init__.py
Outdated
Show resolved
Hide resolved
...pentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/exporter.py
Outdated
Show resolved
Hide resolved
...pentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/exporter.py
Outdated
Show resolved
Hide resolved
...pentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/exporter.py
Outdated
Show resolved
Hide resolved
exporter/opentelemetry-exporter-otlp-proto-grpc/tests/test_otlp_trace_exporter.py
Outdated
Show resolved
Hide resolved
0b93608
to
5363731
Compare
@srikanthccv Please take a look. |
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.
It's in better shape than last time. Few more comments and we should be able to get this merged after them.
...pentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/__init__.py
Outdated
Show resolved
Hide resolved
exporter/opentelemetry-exporter-otlp-proto-grpc/tests/test_otlp_trace_exporter.py
Show resolved
Hide resolved
633d688
to
7518599
Compare
@srikanthccv I am stuck at log exporter tests. Could you help me proceed? |
Are the tests passing locally? I don't think the OTLP log exporter supports |
The tests are not passing locally. I saw that
Logger doesn't call OTLPExporterMixin.init. If you think I need to call this function in the logger. Shouldn't that be a separate PR? |
@srikanthccv I found an issue you filed a while ago which relates to what you are requesting. |
You can ignore the |
Done!! @srikanthccv Please take a look. |
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.
@pridhi-arora We are almost there. This looks good to me. Just two minor things.
...pentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/__init__.py
Outdated
Show resolved
Hide resolved
@srikanthccv Done! |
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.
LGTM, Thank you for addressing all comments.
Thanks, @srikanthccv, for all the help. Do you think I am ready to take this one up now? |
It's assigned to someone else already, but I don't think they are working on it. Let's wait for some time for them to reply; otherwise, I will assign it to you. We can find something else for you if they say they are still working on it. Meanwhile, you can play around with the codebase and browse through the contrib as well https://github.com/open-telemetry/opentelemetry-python-contrib. |
Thanks @srikanthccv. Can you break down https://github.com/open-telemetry/opentelemetry-python-contrib. into parts for me. Which part should I start understanding first? I am asking this so that it doesn't get overwhelming for me. |
...pentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/exporter.py
Outdated
Show resolved
Hide resolved
This PR has enough approvals now, please fix failing test cases and we can merge 😎 |
@pridhi-arora, the lint is still failing. You must reformat your code with black and ensure imports are ordered correctly with isort to get this merged. Please let me know if you need any help with that. |
I will try to do it and will come back to you if in case I need your help. Thanks @srikanthccv |
Please fix the conflicts. |
@srikanthccv, I have resolved the conflicts. Please take a look. |
…try/exporter/otlp/proto/grpc/__init__.py Co-authored-by: Srikanth Chekuri <srikanth.chekuri92@gmail.com>
…try/exporter/otlp/proto/grpc/exporter.py Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com>
@srikanthccv The lint check passes. I am getting the following on the main branch as well.
|
It's probably an issue with your environment only. |
Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes #2958
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
Does This PR Require a Contrib Repo Change?
Answer the following question based on these examples of changes that would require a Contrib Repo Change:
The OTel specification has changed which prompted this PR to update the method interfaces of
opentelemetry-api/
oropentelemetry-sdk/
The method interfaces of
test/util
have changedScripts in
scripts/
that were copied over to the Contrib repo have changedConfiguration files that were copied over to the Contrib repo have changed (when consistency between repositories is applicable) such as in
pyproject.toml
isort.cfg
.flake8
When a new
.github/CODEOWNER
is addedMajor changes to project information, such as in:
README.md
CONTRIBUTING.md
Yes. - Link to PR:
No.
Checklist: