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 support for otlp trace exporters #5477

Closed
wants to merge 5 commits into from

Conversation

Sovietaced
Copy link
Contributor

@Sovietaced Sovietaced commented Jun 14, 2024

Tracking issue

Closes #5476

Why are the changes needed?

Distributed traces can only be exported using Jaeger with the current code. The jaeger protocol has been deprecated in favor of the open telemetry protocol (OTLP). Additionally, if we're using OTEL client libraries Flyte should also just support their native protocol as well.

We should also deprecate use of the Jaeger exporter and slate it for removal.

What changes were proposed in this pull request?

This pull request adds two new trace exporter strategies: otlpGrpc (OTLP over gRPC) and otlpHttp (OTLP over HTTP).

How was this patch tested?

This patch was tested locally in our non production environment.

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Related PRs

Docs link

Copy link

codecov bot commented Jun 14, 2024

Codecov Report

Attention: Patch coverage is 58.33333% with 5 lines in your changes missing coverage. Please review.

Project coverage is 60.99%. Comparing base (c10346d) to head (f87a1aa).

Current head f87a1aa differs from pull request most recent head 2337fe1

Please upload reports for the commit 2337fe1 to get more accurate results.

Files Patch % Lines
flytestdlib/otelutils/factory.go 54.54% 3 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5477      +/-   ##
==========================================
- Coverage   61.01%   60.99%   -0.03%     
==========================================
  Files         794      793       -1     
  Lines       51441    51335     -106     
==========================================
- Hits        31388    31310      -78     
+ Misses      17161    17139      -22     
+ Partials     2892     2886       -6     
Flag Coverage Δ
unittests-datacatalog 69.31% <ø> (ø)
unittests-flyteadmin 58.71% <ø> (-0.03%) ⬇️
unittests-flytecopilot 17.79% <ø> (ø)
unittests-flytectl 67.97% <ø> (-0.12%) ⬇️
unittests-flyteidl 79.04% <ø> (ø)
unittests-flyteplugins 61.81% <ø> (-0.04%) ⬇️
unittests-flytepropeller 57.32% <ø> (+0.02%) ⬆️
unittests-flytestdlib 65.78% <58.33%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -33,7 +35,7 @@ var (
)

type Config struct {
ExporterType ExporterType `json:"type" pflag:",Sets the type of exporter to configure [noop/file/jaeger]."`
ExporterType ExporterType `json:"type" pflag:",Sets the type of exporter to configure [noop/file/jaeger/otlpGrpc/otlpHttp]."`
FileConfig FileConfig `json:"file" pflag:",Configuration for exporting telemetry traces to a file"`
JaegerConfig JaegerConfig `json:"jaeger" pflag:",Configuration for exporting telemetry traces to a jaeger"`
Copy link
Contributor Author

Choose a reason for hiding this comment

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

All the OTEL exporter configuration can come from environment variables so I didn't really see any value in 1) deviating from OTEL and 2) trying to copy all of the settings that can be configured via the OTEL environment variables.

Copy link
Contributor

@andrewwdye andrewwdye Jun 21, 2024

Choose a reason for hiding this comment

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

Good callout @Sovietaced. My hesitation is that it deviates with other trace configuration and how flyte components are configured generally. It adds ambiguity to a component's behavior and how to configure it. I'm inclined to keep consistent.

If it's helpful I have a private version of this I've been playing with to use OTEL + expose some sampling config. I could pull that in instead and save you some cycles. Wdyt?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can see the user experience being a little nicer for some folks if more configuration came through the YAML dictionaries in the helm chart but I'm personally not interested in trying to duplicate the OTEL standardized environment variables so you're probably better of pulling in changes from your fork.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sounds good. I have a draft up at #5504. Let me pull in a few more of the changes you proposed here as well

@EngHabu
Copy link
Contributor

EngHabu commented Jun 20, 2024

@hamersaw @andrewwdye can you plz review this PR?

Signed-off-by: Jason Parraga <[email protected]>
Signed-off-by: Jason Parraga <[email protected]>
Signed-off-by: Jason Parraga <[email protected]>
Signed-off-by: Jason Parraga <[email protected]>
@Sovietaced
Copy link
Contributor Author

Closing in favor of: #5504

@Sovietaced Sovietaced closed this Jun 24, 2024
@Sovietaced Sovietaced deleted the otlp branch July 9, 2024 17:00
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.

[Housekeeping] Distributed Tracing Should Support OTLP Exporters
3 participants