-
Notifications
You must be signed in to change notification settings - Fork 78
vlinsert: improve opentelemetry decode perfomance #720
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
Conversation
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
6ecf185 to
3ae813d
Compare
80bb366 to
e558503
Compare
c54e130 to
dcc053e
Compare
dcc053e to
8c6c7b5
Compare
valyala
approved these changes
Dec 3, 2025
Contributor
|
@vadimalekseev , thank you for the great optimization of OpenTelemetry data ingestion performance at VictoriaLogs! |
valyala
added a commit
to VictoriaMetrics/VictoriaMetrics
that referenced
this pull request
Dec 3, 2025
… in OTEL format This code is no longer needed after the commit VictoriaMetrics/VictoriaLogs@4ffb744 See VictoriaMetrics/VictoriaLogs#720
valyala
added a commit
to VictoriaMetrics/VictoriaMetrics
that referenced
this pull request
Dec 3, 2025
… in OTEL format This code is no longer needed after the commit VictoriaMetrics/VictoriaLogs@4ffb744 See VictoriaMetrics/VictoriaLogs#720
func25
reviewed
Dec 4, 2025
Contributor
|
FYI, this pull request has been included in VictoriaLogs v1.40.0 release. |
valyala
added a commit
to VictoriaMetrics/VictoriaMetrics
that referenced
this pull request
Dec 10, 2025
…rsing of samples send via OpenTelemetry protocol This increases the parser performance by 4x-6x. This commit uses the technique similar to VictoriaMetrics/VictoriaLogs#720 goos: linux goarch: amd64 pkg: github.com/VictoriaMetrics/VictoriaMetrics/lib/protoparser/opentelemetry/stream cpu: AMD Ryzen 7 PRO 5850U with Radeon Graphics │ old.txt │ new.txt │ │ sec/op │ sec/op vs base │ ParseStream/default-metrics-labels-formatting-16 15.565µ ± 1% 2.150µ ± 3% -86.19% (p=0.000 n=10) ParseStream/prometheus-metrics-labels-formatting-16 24.228µ ± 2% 4.355µ ± 1% -82.02% (p=0.000 n=10) ParseStream/prometheus-metrics-formatting-16 23.028µ ± 2% 3.395µ ± 1% -85.26% (p=0.000 n=10) geomean 20.55µ 3.168µ -84.59% │ old.txt │ new.txt │ │ B/s │ B/s vs base │ ParseStream/default-metrics-labels-formatting-16 127.9Mi ± 1% 918.3Mi ± 3% +617.82% (p=0.000 n=10) ParseStream/prometheus-metrics-labels-formatting-16 82.19Mi ± 2% 453.32Mi ± 1% +451.57% (p=0.000 n=10) ParseStream/prometheus-metrics-formatting-16 86.47Mi ± 2% 581.56Mi ± 1% +572.52% (p=0.000 n=10) geomean 96.88Mi 623.3Mi +543.34% │ old.txt │ new.txt │ │ B/op │ B/op vs base │ ParseStream/default-metrics-labels-formatting-16 12.53Ki ± 0% 0.00Ki ± 0% -100.00% (p=0.000 n=10) ParseStream/prometheus-metrics-labels-formatting-16 21.15Ki ± 1% 0.00Ki ± ? -100.00% (p=0.000 n=10) ParseStream/prometheus-metrics-formatting-16 20.74Ki ± 1% 0.00Ki ± ? -100.00% (p=0.000 n=10) geomean 17.65Ki ? ¹ ² ¹ summaries must be >0 to compute geomean ² ratios must be >0 to compute geomean │ old.txt │ new.txt │ │ allocs/op │ allocs/op vs base │ ParseStream/default-metrics-labels-formatting-16 426.0 ± 0% 0.0 ± 0% -100.00% (p=0.000 n=10) ParseStream/prometheus-metrics-labels-formatting-16 514.0 ± 0% 0.0 ± 0% -100.00% (p=0.000 n=10) ParseStream/prometheus-metrics-formatting-16 514.0 ± 0% 0.0 ± 0% -100.00% (p=0.000 n=10) geomean 482.8 ? ¹ ²
Merged
2 tasks
jiekun
added a commit
to VictoriaMetrics/VictoriaTraces
that referenced
this pull request
Jan 7, 2026
Porting VictoriaMetrics/VictoriaLogs#720 to VictoriaTraces, to optimize the OTLP protobuf data ingestion performance. This optimization applies to OTLP protobuf data parsing, converting the input []byte directly into log fields and eliminating the intermediate step of temporarily constructing OTLP data models. Note: The OTLPHTTP/JSON data ingestion will remain not affected.
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.
Describe Your Changes
TODO:
Also added more test cases compared to master to cover all decoding cases.
Also fixed a case that behaved differently compared to the master branch. See this new test case:
VictoriaLogs/app/vlinsert/opentelemetry/opentelemetry_test.go
Lines 315 to 319 in e558503
"[Zm9vIGJhcg==]"which is incorrect because/insert/jsonlineencodes this JSON as"[\"Zm9vIGJhcg==\"]"Fixes #689
Checklist
The following checks are mandatory: