imandra-ai / ocaml-opentelemetry

Instrumentation for https://opentelemetry.io
http://docs.imandra.ai/ocaml-opentelemetry/
33 stars 7 forks source link

Allow spaces in header values set via `OTEL_EXPORTER_OTLP_HEADERS` #29

Closed anuragsoni closed 2 years ago

anuragsoni commented 2 years ago

I was trying to use the library with elastic's APM offering and I noticed errors related to authentication. Elastic's APM integration expected an authorization header of the form Authorization=Bearer <token>. The existing header parsing implementation in the library would discard anything after the first space and parsed this header as (Authorization, Bearer). With the patch in this pull-request I was able to successfully push traces and logs to Elastic APM.

image image image