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

Add opentelemetry capability to the runtime #234

Merged
merged 12 commits into from
Mar 31, 2023
Merged

Conversation

haixuanTao
Copy link
Collaborator

@haixuanTao haixuanTao commented Mar 23, 2023

This commit adds the ability to use the opentelemetry feature flag at runtime by using the env variable DORA_TELEMETRY. Using environment variable reduce the need to do some argument drilling between our different process as well as making configurable in the YAML at no cost.

Usage:

docker run -d -p6831:6831/udp -p6832:6832/udp -p16686:16686 jaegertracing/all-in-one:latest
DORA_JAEGER_TRACING=172.17.0.1:6831 dora-daemon --run-dataflow dataflow.yml

If Jaeger variable is not set, we will default to stdout:

RUST_LOG=trace dora-daemon --run-dataflow dataflow.yml

Main change in this pull request:

  • use tracing_opentelemetry to unify our tracing ecosystem and opentelemetry ecosystem. This enables me to remove locally declared tracer.
  • This also push our current tracing instrumentation into Jaeger when the env variable is activated. ( e.g. The tracing of dora-daemon, Dora-coordinator,...)
  • I have kept the possibility to fully deactivate opentelemetry ( through feature flag) if we want to make the application lighter.

Not included in this PR and will be available in a future PR is making it easy within the user space to leverage the current opentelemetry context.

Copy link
Collaborator

@phil-opp phil-opp left a comment

Choose a reason for hiding this comment

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

Looks good! We should fix the remaining import warnings though (by moving them to the #cfg block).

@haixuanTao haixuanTao marked this pull request as ready for review March 24, 2023 10:08
@haixuanTao haixuanTao force-pushed the env-var-telemetry branch 3 times, most recently from 53e89ed to 75e7f2c Compare March 30, 2023 05:55
Copy link
Collaborator

@phil-opp phil-opp left a comment

Choose a reason for hiding this comment

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

Thanks!

This commit adds the ability to use the `opentelemetry` feature flag at
runtime by using the env variable `DORA_TELEMETRY`. Using environment
variable reduce the need to do some argument drilling between our
different process as well as making configurable in the YAML at no cost.

Usage:

```bash
docker run -d -p6831:6831/udp -p6832:6832/udp -p16686:16686 jaegertracing/all-in-one:latest
DORA_TELEMETRY=true dora-daemon --run-dataflow dataflow.yml
```

Current limitation:

- The telemetry currently only work with Jaeger on the local network with
default port: 6831 and 6832.
@haixuanTao haixuanTao enabled auto-merge March 31, 2023 11:36
@haixuanTao haixuanTao merged commit dfa914a into main Mar 31, 2023
@haixuanTao haixuanTao deleted the env-var-telemetry branch March 31, 2023 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants