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

Otel testing #725

Open
Mirko-von-Leipzig opened this issue Mar 3, 2025 · 0 comments
Open

Otel testing #725

Mirko-von-Leipzig opened this issue Mar 3, 2025 · 0 comments
Labels
telemetry Relates to tracing and open-telemetry test Test related issue
Milestone

Comments

@Mirko-von-Leipzig
Copy link
Contributor

Figure out a reasonable way to test our open-telemetry spans and attributes.

Some investigation was done in #678 (but was reverted as out-of-scope):

Concerns

Ideally we would:

  1. Attach a test span exporter (which collects the spans in memory)
  2. Run some code
  3. Assert on the resulting spans

The main issue iiuc is that the exporter is registered globally which makes running such tests.. a bit difficult.

We also don't want these otel tests to interfere with other tests which don't care about otel (but do create traces).

We could separate out these tests entirely, and force them to run sequentially. This might be a good use case for cargo xtask. Or we treat them as pure integration tests and create a full setup. The downside of this is complexity and inability to specify very niche scenarios.

@Mirko-von-Leipzig Mirko-von-Leipzig added test Test related issue telemetry Relates to tracing and open-telemetry labels Mar 3, 2025
@bobbinth bobbinth added this to the v0.9 milestone Mar 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
telemetry Relates to tracing and open-telemetry test Test related issue
Projects
None yet
Development

No branches or pull requests

2 participants