[Tracing] Implement initial OTLP traces weblog tests#6363
[Tracing] Implement initial OTLP traces weblog tests#6363zacharycmontoya wants to merge 6 commits intomainfrom
Conversation
…ple. Notably, this creates a new scenario APM_TRACING_OTLP to enable the environment variables needed to configure the SDK to export traces as OTLP.
…e only use the "/v1/metrics" subpath
|
|
|
✨ Fix all issues with BitsAI or with Cursor
|
|
|
||
| # Assert spans | ||
| assert span.get("name") == "GET /" | ||
| assert span.get("kind") == "SPAN_KIND_SERVER" |
There was a problem hiding this comment.
Ah yes, for JSON this should be 2, but I don't know what this will end up being for http/protobuf. We can update it to 2 for now and then modify it when we get to exporting http/protobuf
| assert "telemetry.sdk.version" in attributes | ||
| assert "git.commit.sha" in attributes | ||
| assert "git.repository_url" in attributes | ||
| assert "runtime-id" in attributes |
There was a problem hiding this comment.
are these attributes from config.tags which are sent in the header?
There was a problem hiding this comment.
These are an example of attributes that we set on all spans in .NET, so I think it makes sense for us to represent some of them as resource attributes rather than individual span tags
| assert "runtime-id" in attributes | ||
|
|
||
| # Assert spans | ||
| assert span.get("name") == "GET /" |
There was a problem hiding this comment.
where does this one come from? for name I used span.name and got 'express.request'
There was a problem hiding this comment.
I hardcoded this specifically for the .NET test app, but perhaps we can make a dictionary of language->expected name
Motivation
We are seeing increased demand for exporting traces as OTLP from our DD SDKs (rather than Datadog-proprietary MessagePack), so we are prototyping and establishing requirements for generating OTLP traces payloads. This is only the first of a series of PRs to establish clear expectations for what the generated OTLP traces and trace stats will look like.
Changes
APM_TRACING_OTLPscenario to test the weblog application with the configuration needed for the DD SDK to export traces using OTLP. This also adds ainclude_opentelemetryproperty to theEndToEndScenarioto set up the OpenTelemetry interface.tests/otel/test_tracing_otlp.py::Test_Otel_Tracing_OTLP::test_tracingto send a request to the weblog app usingweblog.get("/")and asserts properties of the OTLP trace payloadget_otel_spansandget_trace_statsto retrieve the OTLP payloads for test assertionsWorkflow
🚀 Once your PR is reviewed and the CI green, you can merge it!
🛟 #apm-shared-testing 🛟
Reviewer checklist
tests/ormanifests/is modified ? I have the approval from R&P teambuild-XXX-imagelabel is present