We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'd like my traces to contain OS and process info. I'd like to add basically all the detectors available in https://pkg.go.dev/go.opentelemetry.io/otel/sdk/resource. I don't see a way to do that currently.
One option would be to add launcher.WithDetectors(detectors ...Detector) Option to launcher, so you could say:
launcher.WithDetectors(detectors ...Detector) Option
launcher
otelShutdown, err := launcher.ConfigureOpenTelemetry(launcher.WithDetectors(resource.WithHost(), resource.WithOS()))
This might need the launcher.Config type to be changed to carry detectors in it.
launcher.Config
Another option would be to allow adding the resource explicitly:
res, err := resource.New(context.Background(), resource.WithOS(), resource.WithProcess()) if err != nil { log.Fatalf("could not detect opentelemetry resources: %s", err) } otelShutdown, err := launcher.ConfigureOpenTelemetry(launcher.WithResource(res))
I think for now it's possible to work around the issue by serialising the resource into an attribute map:
res, err := resource.New(context.Background(), resource.WithOS(), resource.WithProcess()) if err != nil { log.Fatalf("could not detect opentelemetry resources: %s", err) } attribs := res.Attributes() attribMap := make(map[string]string) for _, attrib := range attribs { attribMap[string(attrib.Key)] = attrib.Value.AsString() } otelShutdown, err := launcher.ConfigureOpenTelemetry(launcher.WithResourceAttributes(attribMap))
The issue is that this is highly unintuitive.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'd like my traces to contain OS and process info. I'd like to add basically all the detectors available in https://pkg.go.dev/go.opentelemetry.io/otel/sdk/resource. I don't see a way to do that currently.
One option would be to add
launcher.WithDetectors(detectors ...Detector) Option
tolauncher
, so you could say:This might need the
launcher.Config
type to be changed to carry detectors in it.Another option would be to allow adding the resource explicitly:
I think for now it's possible to work around the issue by serialising the resource into an attribute map:
The issue is that this is highly unintuitive.
The text was updated successfully, but these errors were encountered: