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

Otel Module: handle resources #1424

Merged
merged 2 commits into from
May 5, 2023
Merged

Conversation

dmathieu
Copy link
Member

@dmathieu dmathieu commented May 3, 2023

As I was digging through traces generated by this module, I would have wanted to see attributes set by it to identify where the traces were coming from. But I only was able to know the agent was sending them.

So this adds support for resources, as supported in the official OpenTelemetry SDK, which allows setting custom attributes on all spans.
By default, the following attributes are set:

  • service.name: unknown_service:<executable name>
  • telemetry.sdk.language: go
  • telemetry.sdk.name: apmotel
  • telemetry.sdk.version: apm.AgentVersion

This closely matches the default resource from the official SDK: https://github.com/open-telemetry/opentelemetry-go/blob/main/sdk/resource/resource.go#L203

@dmathieu dmathieu requested a review from a team May 3, 2023 10:39
@kruskall
Copy link
Member

kruskall commented May 4, 2023

Copy link
Member

@kruskall kruskall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@dmathieu dmathieu merged commit d04d9fe into elastic:main May 5, 2023
@dmathieu dmathieu deleted the apmotel-resources branch May 5, 2023 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants