Skip to content
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

[chore] [exporter/splunkhec] Do not copy all the data in case of error #21978

Merged
merged 1 commit into from
May 15, 2023

Conversation

dmitryax
Copy link
Member

@dmitryax dmitryax commented May 15, 2023

If the backend replies with a retriable error, do not copy all the data to be included in the error, use the original data instead

Before:

goos: darwin
goarch: arm64
pkg: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/splunkhecexporter
BenchmarkConsumeLogsRejected
BenchmarkConsumeLogsRejected-10    	     939	   1282819 ns/op	 1244725 B/op	   15121 allocs/op
PASS
```

After:

```
BenchmarkConsumeLogsRejected
BenchmarkConsumeLogsRejected-10    	    1098	   1108847 ns/op	  912892 B/op	   13004 allocs/op
```

@dmitryax dmitryax requested a review from a team May 15, 2023 22:15
@dmitryax dmitryax requested a review from atoulme as a code owner May 15, 2023 22:15
If backend replies with a retriable error, do not copy all the data to be included in the error, use the original data instead
@dmitryax dmitryax force-pushed the hec-avoid-copy-on-error branch from fc46fc8 to 9e7e202 Compare May 15, 2023 22:52
@dmitryax dmitryax merged commit 358bccf into open-telemetry:main May 15, 2023
@github-actions github-actions bot added this to the next release milestone May 15, 2023
@dmitryax dmitryax deleted the hec-avoid-copy-on-error branch May 15, 2023 23:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants