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

sdk/log: Add minimum level enabled processor #5078

Closed
MrAlias opened this issue Mar 15, 2024 · 2 comments · Fixed by open-telemetry/opentelemetry-go-contrib#5817
Closed

sdk/log: Add minimum level enabled processor #5078

MrAlias opened this issue Mar 15, 2024 · 2 comments · Fixed by open-telemetry/opentelemetry-go-contrib#5817
Assignees
Labels
area:logs Part of OpenTelemetry logs pkg:SDK Related to an SDK package
Milestone

Comments

@MrAlias
Copy link
Contributor

MrAlias commented Mar 15, 2024

Add a processor users can wrap other processors in that will only log records at or above a provided minimum severity level.

https://github.com/open-telemetry/opentelemetry-go/blob/65e032dd16b20e376eae5a7a5956fa811783389b/sdk/log/min_sev.go

@MrAlias MrAlias converted this from a draft issue Mar 15, 2024
@pellared pellared added pkg:SDK Related to an SDK package area:logs Part of OpenTelemetry logs labels Mar 15, 2024
@pellared pellared changed the title Add minimum level enabled processor sdk/log: Add minimum level enabled processor Mar 15, 2024
@MrAlias MrAlias moved this from Todo to Backlog in Go: Logs (GA) Apr 11, 2024
@pellared
Copy link
Member

I think we should first add the processor to the specification before introducing it to the SDK. Alternatively we could add it to contrib. For now I decided to use it as an example.

@MrAlias
Copy link
Contributor Author

MrAlias commented Jun 26, 2024

User feedback requesting this feature: https://cloud-native.slack.com/archives/C01NPAXACKT/p1719249110767979

@MrAlias MrAlias self-assigned this Jun 26, 2024
@MrAlias MrAlias moved this from Backlog to In Progress in Go: Logs (GA) Jun 26, 2024
MrAlias added a commit to open-telemetry/opentelemetry-go-contrib that referenced this issue Jul 1, 2024
Resolve open-telemetry/opentelemetry-go#5078

Add the experimental `minsev` module. This module provides a log
processor that thresholds all records recorded to being above a minimum
severity.

### Benchmarks

```
goos: linux
goarch: amd64
pkg: go.opentelemetry.io/contrib/processors/minsev
cpu: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
                        │   new.txt   │
                        │   sec/op    │
LogProcessor/Base-8       20.53n ± 2%
LogProcessor/Enabled-8    41.27n ± 5%
LogProcessor/Disabled-8   22.34n ± 8%
geomean                   26.65n

                        │   new.txt    │
                        │     B/op     │
LogProcessor/Base-8       0.000 ± 0%
LogProcessor/Enabled-8    0.000 ± 0%
LogProcessor/Disabled-8   0.000 ± 0%
geomean                              ¹
¹ summaries must be >0 to compute geomean

                        │   new.txt    │
                        │  allocs/op   │
LogProcessor/Base-8       0.000 ± 0%
LogProcessor/Enabled-8    0.000 ± 0%
LogProcessor/Disabled-8   0.000 ± 0%
geomean                              ¹
¹ summaries must be >0 to compute geomean
```
@github-project-automation github-project-automation bot moved this from In Progress to Done in Go: Logs (GA) Jul 1, 2024
@XSAM XSAM added this to the untracked milestone Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:logs Part of OpenTelemetry logs pkg:SDK Related to an SDK package
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants