2/6 Add OTLP binary protobuf core IO and track preparation#2135
Open
gareth-ellis wants to merge 3 commits into
Open
2/6 Add OTLP binary protobuf core IO and track preparation#2135gareth-ellis wants to merge 3 commits into
gareth-ellis wants to merge 3 commits into
Conversation
The ApiError handler in execute_single() decodes `e.body`, `e.error`, and `e.info` as UTF-8 to build a human-readable error message. When the body is binary (e.g., binary protobuf returned by ES OTLP endpoints on 4xx/5xx), the strict decode raises UnicodeDecodeError, which crashes the worker mid-task. Switch the six decode() calls to use errors="replace" so undecodable bytes become U+FFFD instead of aborting the worker. No semantic change for valid UTF-8 (the common case). This is a latent bug independent of OTLP — any operation that surfaces a binary error body would have hit it.
Introduces OtlpProtobufFile in esrally/utils/io.py for reading/writing length-prefixed OTLP ExportMetricsServiceRequest protobufs, plus an offset sidecar to allow worker partitions to seek without scanning. Wires preparation into esrally/track/loader.py and esrally/track/track.py: - New OTLP document set fields (otlp_pb_size_in_bytes, etc.) - prepare_otlp_document_set tries to download a .pb from the corpus base URL, otherwise converts a local JSON corpus to .pb on disk. - set_absolute_data_path picks up the .pb when present. Adds OTLP protobuf bindings to pyproject.toml (opentelemetry-proto). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2 tasks
2 tasks
This was referenced May 29, 2026
ebadyano
reviewed
Jun 16, 2026
| # Some runners return a raw response, causing the 'error' property to be a string literal of the bytes/BytesIO object, | ||
| # we should avoid bubbling that up | ||
| # e.g. ApiError(413, '<_io.BytesIO object at 0xffffaf146a70>') | ||
| # errors="replace" so binary response bodies (e.g. OTLP ingest returns binary protobuf |
Contributor
There was a problem hiding this comment.
isn't this part already merged into master in #2134?
Member
Author
There was a problem hiding this comment.
Yes.....since each builds on each other each pr contains those changes from the previous. Once one is merged we can update branch to exclude the already merged changes
Member
Author
|
@elasticmachine update branch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the foundation for OTLP (OpenTelemetry Protocol) corpora in Rally:
OtlpProtobufFileinesrally/utils/io.py: reads/writes length-prefixedExportMetricsServiceRequestprotobufs, with a sidecar.offsetfile so worker partitions can seek without rescanning the corpus.prepare_otlp_document_setinesrally/track/loader.py: downloads a pre-built.pbfrom the corpus base URL when available, otherwise converts a local JSON corpus on disk.esrally/track/track.py,opentelemetry-protodependency inpyproject.toml.Part 2 of 6 in the OTLP ingest series. Standalone — no dependencies on other PRs in the series.
Series
Test plan
🤖 Generated with Claude Code