Skip to content
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

Add telemetry_span_context following conventions #1128

Merged

Conversation

andrewhr
Copy link
Contributor

Absinthe's telemetry events includes id metadata, as means to correlate start/stop/exception events. Telemetry defines a telemetry_span_context for this same reasons.

This patch publishes the same id value as both keys, so we maintain backwards compatibility as well keep adherent to conventions, for tools that rely on that - like OpenTelemetry.

The telemetry_span_context is generated using :erlang.make_ref/0. Given typespecs describe as term, should be safe to use the same value as id.

Absinthe's telemetry events includes `id` metadata, as means to
correlate start/stop/exception events. Telemetry defines a
`telemetry_span_context` for this same reasons.

This patch publishes the same `id` value  as both keys, sowe maintain
backwards compatibility as well keep adherent to conventions, for tools
that rely on that - like OpenTelemetry.

The `telemetry_span_context` is generated using `:erlang.make_ref/0`.
Given typespecs describe as `term`, should be safe to use the same value
as `id`.
@benwilson512 benwilson512 merged commit 991feb9 into absinthe-graphql:master Nov 28, 2021
@benwilson512
Copy link
Contributor

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants