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: Add basic tracing support #7414

Merged
merged 3 commits into from
Oct 18, 2022
Merged

Conversation

thepalbi
Copy link
Contributor

@thepalbi thepalbi commented Oct 13, 2022

What this PR does / why we need it:
We've been using Promtail's HTTP/gRPC server-based targets with real workloads for some weeks now. The server that these spin out is based on weaveworks commons HTTP/gRPC servers. These include by default some middlewares that if enabled, inject tracing support.

We found this useful when tracking down request handling time, or even more, if the caller also support Jaeger tracing support, cross-correlated requests between the upstream server and Promtail's.

This PR adds support for enabling tracing the same way Loki does. At the moment, this will just generate traces for the before-mentioned targets.

In the future, the quality and completeness of tracing support can grow organically to enrich spans.

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Checklist

  • Reviewed the CONTRIBUTING.md guide
  • Documentation added
  • Tests updated
  • CHANGELOG.md updated
  • Changes that require user attention or interaction to upgrade are documented in docs/sources/upgrading/_index.md

@github-actions github-actions bot added the type/docs Issues related to technical documentation; the Docs Squad uses this label across many repositories label Oct 13, 2022
@thepalbi thepalbi force-pushed the pablo/add-promtail-tracing branch from baef6e7 to e84c24e Compare October 14, 2022 14:02
@pull-request-size pull-request-size bot added size/M and removed size/L labels Oct 14, 2022
@thepalbi thepalbi changed the title Promtail: Add toggle to enable tracing Promtail: Add basic tracing support Oct 14, 2022
@thepalbi thepalbi marked this pull request as ready for review October 14, 2022 14:08
@thepalbi thepalbi requested a review from a team as a code owner October 14, 2022 14:08
@grafanabot
Copy link
Collaborator

./tools/diff_coverage.sh ../loki-main/test_results.txt test_results.txt ingester,distributor,querier,querier/queryrange,iter,storage,chunkenc,logql,loki

Change in test coverage per package. Green indicates 0 or positive change, red indicates that test coverage for a package fell.

+           ingester	0%
+        distributor	0%
+            querier	0%
+ querier/queryrange	0%
+               iter	0%
+            storage	0%
+           chunkenc	0%
+              logql	0%
+               loki	0%

Copy link
Contributor

@MichelHollands MichelHollands left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@grafanabot
Copy link
Collaborator

./tools/diff_coverage.sh ../loki-main/test_results.txt test_results.txt ingester,distributor,querier,querier/queryrange,iter,storage,chunkenc,logql,loki

Change in test coverage per package. Green indicates 0 or positive change, red indicates that test coverage for a package fell.

+           ingester	0%
+        distributor	0%
+            querier	0%
+ querier/queryrange	0%
+               iter	0%
+            storage	0%
+           chunkenc	0%
+              logql	0%
+               loki	0%

@grafanabot
Copy link
Collaborator

./tools/diff_coverage.sh ../loki-main/test_results.txt test_results.txt ingester,distributor,querier,querier/queryrange,iter,storage,chunkenc,logql,loki

Change in test coverage per package. Green indicates 0 or positive change, red indicates that test coverage for a package fell.

+           ingester	0%
+        distributor	0%
+            querier	0%
+ querier/queryrange	0.1%
+               iter	0%
+            storage	0%
+           chunkenc	0%
+              logql	0%
+               loki	0%

@thepalbi thepalbi force-pushed the pablo/add-promtail-tracing branch from 5c0d64a to 2459c0e Compare October 17, 2022 13:36
@grafanabot
Copy link
Collaborator

./tools/diff_coverage.sh ../loki-main/test_results.txt test_results.txt ingester,distributor,querier,querier/queryrange,iter,storage,chunkenc,logql,loki

Change in test coverage per package. Green indicates 0 or positive change, red indicates that test coverage for a package fell.

+           ingester	0.1%
+        distributor	0%
+            querier	0%
+ querier/queryrange	0%
+               iter	0%
+            storage	0%
+           chunkenc	0%
+              logql	0%
+               loki	0%

@thepalbi
Copy link
Contributor Author

Thanks for taking a look @MichelHollands . Can we merge this?

@MichelHollands MichelHollands merged commit 5f66565 into main Oct 18, 2022
@MichelHollands MichelHollands deleted the pablo/add-promtail-tracing branch October 18, 2022 13:32
lxwzy pushed a commit to lxwzy/loki that referenced this pull request Nov 7, 2022
We've been using Promtail's HTTP/gRPC server-based targets with real
workloads for some weeks now. The server that these spin out is based on
[weaveworks commons](https://github.com/weaveworks/common) HTTP/gRPC
servers. These include by default some middlewares that if enabled,
inject tracing support.

We found this useful when tracking down request handling time, or even
more, if the caller also support Jaeger tracing support,
cross-correlated requests between the upstream server and Promtail's.

This PR adds support for enabling tracing the same way Loki does. At the
moment, this will just generate traces for the before-mentioned targets.

In the future, the quality and completeness of tracing support can grow
organically to enrich spans.
changhyuni pushed a commit to changhyuni/loki that referenced this pull request Nov 8, 2022
We've been using Promtail's HTTP/gRPC server-based targets with real
workloads for some weeks now. The server that these spin out is based on
[weaveworks commons](https://github.com/weaveworks/common) HTTP/gRPC
servers. These include by default some middlewares that if enabled,
inject tracing support.

We found this useful when tracking down request handling time, or even
more, if the caller also support Jaeger tracing support,
cross-correlated requests between the upstream server and Promtail's.

This PR adds support for enabling tracing the same way Loki does. At the
moment, this will just generate traces for the before-mentioned targets.

In the future, the quality and completeness of tracing support can grow
organically to enrich spans.
Abuelodelanada pushed a commit to canonical/loki that referenced this pull request Dec 1, 2022
We've been using Promtail's HTTP/gRPC server-based targets with real
workloads for some weeks now. The server that these spin out is based on
[weaveworks commons](https://github.com/weaveworks/common) HTTP/gRPC
servers. These include by default some middlewares that if enabled,
inject tracing support.

We found this useful when tracking down request handling time, or even
more, if the caller also support Jaeger tracing support,
cross-correlated requests between the upstream server and Promtail's.

This PR adds support for enabling tracing the same way Loki does. At the
moment, this will just generate traces for the before-mentioned targets.

In the future, the quality and completeness of tracing support can grow
organically to enrich spans.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/M type/docs Issues related to technical documentation; the Docs Squad uses this label across many repositories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants