-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
Problem Statement
Sorry if this is not a feasible question.
I am trying to use otel exporter lib to export otel data to an otel collector. And I need to set auth header. This is what I do:
kv := make(map[string]string)
kv["Authorization"] = "Bearer " + token
exporter := otlpmetrichttp.New(ctx, otlpmetrichttp.WithHeaders(kv))
The problem is that I cannot find an API to update the header once the exporter is initialized but when the token is expired, seems the only way is to create another exporter instance.
Is there a way to update the header in the exporter? or if there is not, is it Okay to add an API to update that?
MSTF and Vlaquit
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request