-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OTEL Exporter - multi-tenancy support based on labels #5733
Comments
@codeboten @dmitryax @Aneurysm9 @mx-psi @jpkrohling I think this should be transfered to Core but I don't have the permissions to do it. |
Done. I think this needs some discussion to figure out what can be done here in a generic fashion. While it would be OK for the Loki exporter to have a native "tenant" attribute which translates to a specific header that is sent to the backend, having the same as part of the OTLP exporter would probably not be appropriate. I think the cleanest would be to have a client authenticator which would obtain the tenancy data from a static source or resource attributes. What do you think? |
Gets more complicated if the tenancy needs to come from a dynamic source instead of a piece of telemetry/data from within the collector itself, which feels like a valid situation. This is an interesting topic, I'll add it to the SIG meeting for 8/17 (the next one I'll be at). I'd like to see a generic solution in the collector to be able to dynamically change things like ID/License/key for exporters/specific exporters. |
We also have similar use case, linked PR that introduces |
Given the limitation that batch processor discards the context of telemetry data and builds a new one, does it make sense to workaround this by having a pipeline as following, if receiver sets auth info in attributes instead of context, though ideally batch processor should take client info into consideration as mentioned by #4544.. |
@jpkrohling open-telemetry/opentelemetry-collector-contrib#12892 should resolve this issue, can you please close it? |
Is your feature request related to a problem? Please describe.
Tempo supports multitenancy using an HTTP header (such as "X-Scope-OrgID"). With the current implementation of the OTEL exporter, we need to create an exporter per tenant (by setting the header or the endpoint url).
That means each time we want to add a tenant we need to change collector’s configuration or add a new collector, and we should be aware of all tenants of our infrastructure (I want to say exhaustive).
Describe the solution you'd like
A tenant may add (or through an intermediate collector) a label to the metrics representing its name (for instance tenant="123abc"), and the collector may automatically configure the header or the query param accordingly.
Additional context
The Loki exporter recently had this functionality added - open-telemetry/opentelemetry-collector-contrib#3121
And the prometheusremotewriteexporter has this issue for the same function
open-telemetry/opentelemetry-collector-contrib#7945
The text was updated successfully, but these errors were encountered: