Skip to content

Conversation

@andborja
Copy link
Contributor

Add OTLP export support for internal telemetry opentelemetry integration.

@andborja andborja requested a review from a team as a code owner December 10, 2025 01:12
@github-actions github-actions bot added the rust Pull requests that update Rust code label Dec 10, 2025
@codecov
Copy link

codecov bot commented Dec 10, 2025

Codecov Report

❌ Patch coverage is 93.23671% with 28 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.87%. Comparing base (e8f2607) to head (3555fe7).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1566      +/-   ##
==========================================
+ Coverage   83.83%   83.87%   +0.03%     
==========================================
  Files         433      440       +7     
  Lines      123668   123967     +299     
==========================================
+ Hits       103678   103974     +296     
- Misses      19456    19459       +3     
  Partials      534      534              
Components Coverage Δ
otap-dataflow 85.08% <93.23%> (+0.05%) ⬆️
query_abstraction 80.61% <ø> (ø)
query_engine 90.46% <ø> (ø)
syslog_cef_receivers ∅ <ø> (∅)
otel-arrow-go 53.50% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

// If there is a tokio runtime already, use it. Otherwise, create a new one.
let tokio_runtime = match runtime {
Some(rt) => rt,
None => tokio::runtime::Runtime::new()
Copy link
Member

Choose a reason for hiding this comment

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

This part , I am not sure what is the right thing to do. If we just create a runtime like above, will it create new thread(s)? Or should we use the current-thread runtime? I am unsure how this would affect rest of df_engine.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It basically creates the runtime "lazy/on-demand". It will be created only if needed, and only once.

Copy link
Member

Choose a reason for hiding this comment

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

I am referring to which thread(s) the runtime will run on? The df_engine has some logic to ensure it runs on the threads (and cpu cores) requested by user. This is probably not an issue, but I don't have enough understand of the engine/controller to confirm.

Copy link
Member

Choose a reason for hiding this comment

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

This Tokio runtime is created once in the main/controller thread, before the per-core pipeline threads are spawned. There are per-core runtimes, which are different.

Copy link
Member

Choose a reason for hiding this comment

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

I also opened #1573 to discuss this more. Maybe there is no action required, but something to track.

Comment on lines +101 to +103
OtlpProtocol::HttpJson => {
exporter = Self::configure_http_exporter(otlp_config, Protocol::HttpJson)?
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Can HTTP/JSON be an optional feature, or even left out in this case?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The user is not forced to configure it... only used if configured. It is not a separate library.

Copy link
Member

@cijothomas cijothomas left a comment

Choose a reason for hiding this comment

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

LGTM.
Left some non-blocking comments about whether we need to specially handle the tokio runtime to align with rest of df_engine. It's worth discussing separately.


/// The temporality of the metrics to be exported.
#[serde(default)]
pub temporality: Temporality,
Copy link
Member

@lalitb lalitb Dec 10, 2025

Choose a reason for hiding this comment

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

For future iteration - good to add header support - for auth headers (bearer token, API-KEYs etc). otel-otlp supports adding headers in builder, so should be feasible to extend.

@lalitb
Copy link
Member

lalitb commented Dec 10, 2025

Changes looks good. Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rust Pull requests that update Rust code

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

4 participants