Skip to content

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

Description

@hhedger-ae

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)
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions