Skip to content

Document how to test that you're instrumenting traces correctly #1630

Open
@cartermp

Description

@cartermp

Something I've seen come up a few times is: "How do I unit test that I'm adding the right attributes to a span?"

You can't test this with the tracing API because it doesn't give you access to this data. But you can depend on the "SDK trace API" in a language to get access to a read/write span.

This should probably be documented with an example in all the languages with stable tracing:

  • JS
  • Java
  • Go
  • .NET
  • Python
  • Elixir
  • Ruby
  • C++

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions