-
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: send logs #4175
opentelemetry: send logs #4175
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.
(This also needs a changelog fragment before leaving draft status.)
I'll put this implementation on-hold since OTEL span events might eventually become deprecated, and OTEL logs will be the long term approach to put in place, I'll work on this |
* upstream/main: (203 commits) Make pfexec become usable for illumos (ansible-collections#3889) znode: add options for authentication (ansible-collections#5306) keycloak_user_federation: add explanation and example to vendor option (ansible-collections#4893) Next expected release is 5.8.0. Allow terraform module to specify complex variable structures (ansible-collections#4797) Fix ansible-collections#5313: redhat_subscription module is not idempotent when pool_ids (ansible-collections#5319) bitwarden: Add field to search for all item attributes, instead of on… (ansible-collections#5297) New Module: Keycloak User Rolemapping (ansible-collections#4898) chore: Update lxc_container to support py3 (ansible-collections#5304) terraform: run `init` with no-color, too (ansible-collections#5147) nmcli: fix error when setting previously unset mac address (ansible-collections#5291) [feat] proxmox_snap: snapshot containers with configured mountpoints (ansible-collections#5274) machinectl: include the success command (ansible-collections#5287) Add SetSessionService to redfish_config (ansible-collections#5009) locale_gen: fix UbuntuMode (ansible-collections#5282) ini_file: fix lint error (ansible-collections#5307) netcup_dnsapi: Add timeout paramter (ansible-collections#5301) stable-2.14 is now default. Add stable-2.14 to CI, adjust to devel version bump (ansible-collections#5298) Try to run reuse workflow without explicitly allowing it for new contributors. (ansible-collections#5296) ...
@v1v this PR contains the following merge commits: Please rebase your branch to remove these commits. |
Docs Build 📝Thank you for contribution!✨ This PR has been merged and your docs changes will be incorporated when they are next published. |
SUMMARY
Enable shipping logs with OpenTelemetry in order to allow logs correlations with traces.
ISSUE TYPE
COMPONENT NAME
opentelemetry
ADDITIONAL INFORMATION
More context with some questions :)
I decided to call
self._dump_results
in each callback function and store the object in the TaskData. I don't know if this could be problematic and it's worthy to use a different approach, like calling_dump_results
when needed. In fact, that's how the logstash and some other plugins work.As far as I see the output from
self._dump_results
looks a good candidate since the data structure is ansible based, and therefore there is no need to reinvent any new format but use the one from Ansible core.From the implementation details I used add_event since Logs/Events are the same in OpenTelemetry -> event and logs with OTEL.
Given
And if I run without the logs:
Produces
While if I run with the logs:
produces