Allow sending headers to the OpenTelemetry collector

Created on 12 February 2024, 6 months ago
Updated 13 March 2024, 5 months ago

Problem/Motivation

Core's performance tests support sending traces to OpenTelemetry, this produces the dashboard at https://gander.tag1.io/d/teMVIdjVz/umami?orgId=1&from=now-24h&to=now&var...

Currently there isn't authorisation on that endpoint so people could potentially send invalid traces to it. Additionally, services like grafana cloud which contrib/custom tests writes might want to connect to require sending headers with the request.

We can use https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v... for core (which is also what grafana cloud uses), but implementing that will depend on this MR, which will also need to work with the no-headers case. Crediting @slashrsm for finding the basic auth docs.

Steps to reproduce

Proposed resolution

The third argument to OtlpHttpTransportFactory::create() is an array of headers. We can support a new environment variable, OTEL_COLLECTOR_HEADERS that's a json string, if it's set, decode it and add it here.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

📌 Task
Status

Fixed

Version

10.2

Component
PHPUnit 

Last updated 1 minute ago

Created by

🇬🇧United Kingdom catch

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024