Closed samin36 closed 6 months ago
Thanks for the issue. The schema_url is not getting populated for metrics here: OtlpMetricUtils::PopulateResourceMetrics().
Need to add
resource_metrics->set_schema_url(scope_metrics.scope_->GetSchemaUrl());
in above-mentioned method.
This issue is available for anyone to work on. Make sure to reference this issue in your pull request. :sparkles: Thank you for your contribution! :sparkles:
Describe your environment Opentelemetry-cpp v1.12.0 on Ubuntu 18
Steps to reproduce Specify
schema_url
to theGetMeter
,GetTracer
, andResource::Create
functions and set up Tracer/Meter providers to export using the OTLP HTTP exporters.What is the expected behavior? The exported metrics and traces should contain the
schema_url
.What is the actual behavior? Only the exported traces contain the
schema_url
. The exported metric data does not contain theschema_url
.Additional context I verified this by using the
logging
exporter in the Opentelemetry-Collector, which prints the metric/tracing data. I also set up a dummy HTTP server to log all incoming data at/v1/metrics
and/v1/traces
endpoint and only saw theschema_url
for the tracing data.