Skip to content
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

promtail client is not able to send orgID headers #1040

Closed
tivvit opened this issue Sep 22, 2019 · 2 comments · Fixed by #1135
Closed

promtail client is not able to send orgID headers #1040

tivvit opened this issue Sep 22, 2019 · 2 comments · Fixed by #1135
Labels
stale A stale issue or PR that will automatically be closed.

Comments

@tivvit
Copy link
Contributor

tivvit commented Sep 22, 2019

I am writing a Kafka to Loki component and I am using Loki client from promtail. I am not using proxy for authentication yet but I think that it will not solve my problem.

Problem is that the data in Kafka is multi-tenant, therefore I need to send data to Loki with X-Scope-OrgID header. Determining OrgID is not trivial, therefore I think it would not be great to solve it in the proxy. It would be possible to send it in the data field but then it would have to be parsed in the proxy to determine OrgID but I think it is just simpler to set the header directly in the client.

The client is creating batches based on the labels, therefore I propose extracting the header from the labels.

I will send PR with example code.

@tivvit
Copy link
Contributor Author

tivvit commented Sep 22, 2019

I can see that all logs (entries and labels) are sent in one bulk. How does promtail solves this? When proxy gets this request I suppose everything has to be from one organization.

I will try to split send to multiple sends with different headers.

@stale
Copy link

stale bot commented Oct 22, 2019

This issue has been automatically marked as stale because it has not had any activity in the past 30 days. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale A stale issue or PR that will automatically be closed. label Oct 22, 2019
@stale stale bot closed this as completed Oct 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale A stale issue or PR that will automatically be closed.
Projects
None yet
1 participant