-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Opentelemetry stops sending traces with 9.0.0 #8566
Comments
Files identified in the description: If these files are incorrect, please update the |
#8321 is the PR that introduced the support for the As far as I see, the change uses the same exporter by default. Can you try to run the plugin with the explicit configuration entries?
IIUC, you tried locally running |
Tried setting all of the possible config options to their defaults in the ansible.cfg and still the same issue, it just simply isn't trying to send the traces. If I do a |
Seeing the same issue here. Works nicely in 8.6, but silently stops sending traces in >=9.0.0. |
I can see a few changes were added to v9.0: IIUC, from the description, the issue might be related to supporting HTTP exporters and the existing GRPC support. @wilfriedroset @russoz, since you worked and helped on #8321, would you mind if I asked you to double-check if things work nicely on your end if you use >= |
tested with 9.2.0. problem persist 8.6.3 works ok ansible [core 2.14.14] |
Hi @v1v I pretty much helped review it from a Python/Ansible perspective, I am not familiar enough with OpenTelemetry to make a call on the plugin logic. @wilfriedroset Would it be possible for you to double check the code change? TIA |
I have just reviewed the changes in that PR, and to the best of my ability I could not find anything that would be a problem. There are 4 other PRs after #8321 that might have introduced a problem (I have no x-ref' d them with the version tag, so probably not all of them apply). |
I've merged #8741, would be great if someone could verify that it fixes this bug. |
with this version we only get the trace without any spans. if we use the community.general < 9.0.0 we have all the spans correctly reported. |
friendly push if someone has any pointer to the cause of this? |
Sorry for the radio silence; I cannot reproduce the missing traces/spans error with the latest changes in How did I test this out?I've been using the latest changes for the otel ansible plugin and testing against an OTEL Collector that has been configured with the Elastic exporter OTEL collector config
receivers:
otlp:
protocols:
grpc:
http:
exporters:
otlp/elastic:
endpoint: "${env:APM_URL}"
headers:
Authorization: "Bearer ${env:APM_TOKEN}"
service:
pipelines:
traces:
receivers: [otlp]
exporters: [otlp/elastic]
logs:
receivers: [otlp]
exporters: [otlp/elastic] Then I ran docker-compose.yml
and ran: $ OTEL_EXPORTER_OTLP_INSECURE=true \
OTEL_EXPORTER_OTLP_ENDPOINT=localhost:4317 \
ansible-playbook playbook.yml and so far so good in both cases My current environment is: Expand to view
If I update those dependencies, it works too: Expand to view
If you'd like to reuse what I've done, v1v/otel-ansible-callback-plugin#2 might help you - you can configure another OTEL vendor. Please let me know if you can provide what vendors you can see it's not working |
However, if I use the latest container (
Then the same setup it's not working:
Regardless, https://github.com/ansible-collections/community.general/blob/main/plugins/callback/opentelemetry.py works fine if I use OTEL_EXPORTER_OTLP_INSECURE=true \
OTEL_EXPORTER_OTLP_ENDPOINT=https://*****.elastic-cloud.com:443 \
OTEL_EXPORTER_OTLP_HEADERS="Authorization=Bearer *****" \
ansible-playbook playbook.yml
[...]
PLAY RECAP *********************************************************************
localhost : ok=3 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 |
We can close this issue. So far I have not been able to reproduce the issue after the fix done at #8566 (comment) |
@moserke any objection to that? |
needs_info |
Thanks @russoz. Sounds good to me. My apologies for missing all of these. |
it started to work again with one of latest versions. looks good here too. |
@v1v since you're a maintainer for this plugin you can write |
close_me |
Summary
When going from 8.6.2 to 9.0.0 the opentelemetry callback stops sending traces to the endpoint. Same exact configuration and traces get forwarded in 8.6.2 but go nowhere in 9.0.0. I suspect it's due to how the exporter is getting picked but can't seem to figure out how to make it work.
Issue Type
Bug Report
Component Name
opentelemetry callback
Ansible Version
Community.general Version
Configuration
$ ansible-config dump --only-changed
OS / Environment
No response
Steps to Reproduce
ansibile config:
[defaults]
callbacks_enabled = community.general.opentelemetry
Run playbook
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317 ansible-playbook playbook.yml
Expected Results
Expect traces to be sent to endpoint
Actual Results
Traces are never forwarded
Code of Conduct
The text was updated successfully, but these errors were encountered: