8000 Ensure tracing export data is newline-separated by joshwlewis · Pull Request #926 · heroku/libcnb.rs · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Ensure tracing export data is newline-separated #926

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

Merged
merged 4 commits into from
Mar 25, 2025
Merged

Conversation

joshwlewis
Copy link
Member
@joshwlewis joshwlewis commented Mar 25, 2025

When exporting tracing data batches multiple times (this happens when there more spans in the queue than the batch size), the JSON objects are incorrectly on the same line. This prevents JSONL parsers (like cnb-otel-collector) from working, as they expect valid JSON objects on each line.

To fix this, we insert a \n after each export batch.

Thanks @colincasey for uncovering this bug.

@joshwlewis joshwlewis requested a review from a team as a code owner March 25, 2025 17:51
@edmorley edmorley added bug Something isn't working libcnb labels Mar 25, 2025
@joshwlewis joshwlewis merged commit 880775a into main Mar 25, 2025
6 checks passed
@joshwlewis joshwlewis deleted the jwl/tracing-newline branch March 25, 2025 19:11
colincasey added a commit that referenced this pull request Apr 16, 2025
* main:
  Update petgraph requirement from 0.7.1 to 0.8.1 (#934)
  Update repo metadata (#933)
  Add `tracing-opentelemetry` to the OTel crate Dependabot group (#931)
  Bump the github-actions group with 2 updates (#928)
  Prepare release v0.28.1 (#927)
  Ensure tracing export data is newline-separated (#926)
  Use `--locked` with Cargo where possible (#925)
  Pin SHA of third-party GitHub Actions (#923)
  Reduce scopes granted to `GITHUB_TOKEN` in GitHub Actions workflows (#924)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working libcnb
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0