-
Notifications
You must be signed in to change notification settings - Fork 5
Closed
Description
Following up on conversation in r-lib/httr2#729: it's hard to write unit tests that confirm that telemetry is working right now.
Some of the existing otelsdk tests use a pattern of writing spans to disk and then parsing them back to confirm that spans are created correctly:
otelsdk/tests/testthat/test-tracer.R
Lines 12 to 14 in 3162000
| tmp <- tempfile(fileext = "otel") | |
| on.exit(unlink(tmp), add = TRUE) | |
| trc_prv <- tracer_provider_stdstream_new(tmp) |
However, I think we should have an in-memory tracer provider specifically for testing in otel. This is a fairly common pattern in the ecosystem -- see e.g. Logfire, which has a nice API that we could emulate. I noticed the Go SDK has a testing provider as well.
gaborcsardi
Metadata
Metadata
Assignees
Labels
No labels