-
Notifications
You must be signed in to change notification settings - Fork 42
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
Tags set with SetTag aren't showing up in APM #177
Comments
Hi @vesquen, this is sadly a known issue with how our lambda instrumentation works with golang and other languages that use what we call "universal instrumentation" (ie java, dotnet, ruby, go). For these languages we defer a lot of instrumentation work to the Datadog Extension, including the creation of the root The work around would be to create another span and add your tags there. return func(ctx context.Context, event events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error) {
child := tracer.StartSpan("child-span", tracer.ChildOf(ctx))
child.SetTag("hello", "world")
defer child.Finish()
...
} |
Thank you for your input (and the workaround). Given the nature of this “bug”, I suppose this won’t change in the short term? |
@vesquen Unfortunately not in the short term, though we are actively considering alternative approaches. However, none of them would land in the coming quarters. Will the work around I offered help you? If not, what exactly is it you are attempting to do. There should be a way for us to get you what you need, albeit with a little more creativity than otherwise necessary. |
The workaround works as expected. |
Expected Behavior
Using
SetTag()
on a span after getting it from the context withtracer.SpanFromContext()
should add a tag to the span.Actual Behavior
All default tags are there, but the added tag(s) aren't showing up.
Steps to Reproduce the Problem
lambda.StartWithOptions(ddlambda.WrapFunction(handler.Handler(), nil))
Specifications
ENV Vars:
A similar issue was reported a while ago: #124
The text was updated successfully, but these errors were encountered: