Skip to content

Conversation

@gouslu
Copy link
Contributor

@gouslu gouslu commented Nov 29, 2025

No description provided.

@github-actions github-actions bot added the rust Pull requests that update Rust code label Nov 29, 2025
@gouslu gouslu changed the title gigla gzip batcher and performance improvements. azure monitor exporter gzip batcher and performance improvements. Nov 29, 2025
@codecov
Copy link

codecov bot commented Nov 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.47%. Comparing base (89d92af) to head (ea12384).
⚠️ Report is 21 commits behind head on main.

❗ There is a different number of reports uploaded between BASE (89d92af) and HEAD (ea12384). Click for more details.

HEAD has 5 uploads less than BASE
Flag BASE (89d92af) HEAD (ea12384)
8 3
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1490       +/-   ##
===========================================
- Coverage   83.47%   62.47%   -21.00%     
===========================================
  Files         420      277      -143     
  Lines      116344    71790    -44554     
===========================================
- Hits        97117    44854    -52263     
- Misses      18693    26402     +7709     
  Partials      534      534               
Components Coverage Δ
otap-dataflow 10.40% <ø> (-74.39%) ⬇️
query_abstraction 80.61% <ø> (ø)
query_engine 90.30% <ø> (+0.03%) ⬆️
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.

#[allow(clippy::print_stdout)]
fn create_credential(auth_config: &AuthConfig) -> Result<Arc<dyn TokenCredential>, String> {
match auth_config.method {
AuthMethod::ManagedIdentity => {
Copy link
Member

Choose a reason for hiding this comment

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

Auth now supports managed identity and dev creds but not Azure Arc MSI; I understand this would be add later, but please add a TODO (and also create issue) tracking Azure Arc MSI support so the exporter can run on edge/Arc devices.

if self.total_uncompressed_size == 0 {
self.buf
.write_all(b"[")
.expect("write to memory buffer failed");
Copy link
Member

Choose a reason for hiding this comment

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

With `expect, any unexpected gzip/memory error crashes the exporter instead of surfacing an error.

let json_bytes =
serde_json::to_vec(&body).map_err(|e| format!("Failed to serialize to JSON: {e}"))?;
// Clone static headers and add the auth header
let mut headers = self.static_headers.clone();
Copy link
Member

Choose a reason for hiding this comment

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

these are static headers - I believe we should be able to avoid cloning in hot path.

self.current_uncompressed_size += 1;
} else {
self.buf
.write_all(b",")
Copy link
Member

@lalitb lalitb Dec 1, 2025

Choose a reason for hiding this comment

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

we append , here, but later when the size check triggers a flush, the batch is emitted as [... ,] without the attempted element. Trailing comma will make the JSON invalid, and most probably fail at ingestion.

@gouslu gouslu force-pushed the gouslu/gigla_exporter_batching branch from d0d5368 to 413048d Compare December 3, 2025 04:11
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.

2 participants