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

When using @Span, would it make sense to be able to add the args that a method was called with as span tags? #13

Open
hhedger-ae opened this issue Dec 2, 2022 · 0 comments

Comments

@hhedger-ae
Copy link

hhedger-ae commented Dec 2, 2022

Just discovered @span and the module options to add spans to all providers and controllers and I'm really excited about it.

When debugging, I feel like it'd be useful to be able to see what arguments a wrapped method was called with via span tags. Any thoughts on this?

Something like:

DatadogTraceModule.forRoot({ controllers: true, providers: true, includeArgs: true })

or @Span({ includeArgs: true })

I'm still fairly new to DataDog, so I don't know if this would be a mistake or not. Thanks for your work on this!

I assume here https://github.com/codebrick-corp/nestjs-ddtrace/blob/main/src/decorator.injector.ts#L127

You'd add something that was essentially

if (includeArgs) {
  span.setTag('args', args)
}
@hhedger-ae hhedger-ae changed the title When using @Span, would it make sense to be able to add the args that a method was called with as span tags? When using @Span, would it make sense to be able to add the args that a method was called with as span tags? Dec 2, 2022
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

No branches or pull requests

1 participant