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

Export OpenTelemetry traces during deploy #584

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sandydoo
Copy link
Member

@sandydoo sandydoo commented Sep 28, 2023

Resolves #562.

Haven't tested this yet.

@sandydoo sandydoo added enhancement New feature or request deploy labels Sep 28, 2023
@sandydoo sandydoo marked this pull request as draft September 28, 2023 11:41
@domenkozar
Copy link
Member

@zowoq could you give this a try?

@zowoq
Copy link

zowoq commented Nov 8, 2023

Happy to test this but I'm not familiar with opentelemetry so I'll need to figure out how to wire it up to telegraf, seems to require more than just enabling the telegraf opentelemetry plugin.

@domenkozar
Copy link
Member

@zowoq
Copy link

zowoq commented Nov 8, 2023

Something like https://github.com/influxdata/telegraf/tree/master/plugins/inputs/opentelemetry

Does it require any specific config? As I said, just enabling the plugin doesn't seem to work?

@domenkozar domenkozar added this to the 1.7 milestone Nov 8, 2023
@sandydoo
Copy link
Member Author

sandydoo commented Nov 9, 2023

The telegraf plugin only supports gRPC and our Haskell library only exports binary payloads via HTTP. 🤦

One way around this would be to run an instance of the OpenTelemetry Collector. It speaks both protocols.

@sandydoo
Copy link
Member Author

sandydoo commented Nov 9, 2023

You can use environment variables to change where and how the cachix client exports traces: https://opentelemetry.io/docs/concepts/sdk-configuration/otlp-exporter-configuration/. The default HTTP endpoint is http://localhost:4318.

AFAIK, it's recommended to run the collector locally on each machine and configure it to export to your remote datastore.

@zowoq
Copy link

zowoq commented Nov 9, 2023

My interest in this was that it would integrate into our existing monitoring, I am not going to run another service (either a central instance or locally on each machine) just to pull metrics from a single service.

Thank you anyway, I appreciate the effort that went into implementing this PR.

@sandydoo
Copy link
Member Author

@zowoq, yeah, that makes sense. I wonder how much work it would be to get our end speak gRPC 🤔

@domenkozar
Copy link
Member

My interest in this was that it would integrate into our existing monitoring, I am not going to run another service (either a central instance or locally on each machine) just to pull metrics from a single service.

Thank you anyway, I appreciate the effort that went into implementing this PR.

Note that you would only need to run telemetry-collector daemon on the cachix deploy nodes that would then push to your telegraf instance.

@zowoq
Copy link

zowoq commented Nov 14, 2023

Note that you would only need to run telemetry-collector daemon on the cachix deploy nodes that would then push to your telegraf instance.

Telegraf is a collector that we run on each machine that is scraped by our prometheus instance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deploy enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OpenTelemetry for deploy
3 participants