Skip to content

Conversation

@xgoffin
Copy link
Contributor

@xgoffin xgoffin commented Feb 2, 2026

What does this PR do?

After adding mechanisms to group handle the error level for given events based on the properties of their errors, the next step is to allow the developer to select the level to which a specific error is reported.

This will also allow us to easily keep reporting things as "warning" without cluttering Sentry in a needless way.

This patch needs to be accompanied by its corresponding patch on github.com/upfluence/log, for instance:

diff --git a/sink/error_logger/sink.go b/sink/error_logger/sink.go
index 5e4a308..3c1a858 100644
--- a/sink/error_logger/sink.go
+++ b/sink/error_logger/sink.go
@@ -7,6 +7,7 @@ import (
        "github.com/upfluence/errors/reporter"
        "github.com/upfluence/log/record"
        "github.com/upfluence/log/sink"
+       "github.com/upfluence/pkg/pointers"
 )
 
 type Sink struct {
@@ -55,7 +56,14 @@ func (s *Sink) Log(r record.Record) error {
        }
 
        for _, err := range errs {
-               s.r.Report(err, reporter.ReportOptions{Tags: tags, Depth: s.df.fetch()})
+               s.r.Report(
+                       err,
+                       reporter.ReportOptions{
+                               Tags:          tags,
+                               Depth:         s.df.fetch(),
+                               ReportedLevel: pointers.Ptr(r.Level()),
+                       },
+               )
        }

A pull request for this will be opened if/when this one is merged.

Fixes #

What are the observable changes?

Good PR checklist

  • Title makes sense
  • Is against the correct branch
  • Only addresses one issue
  • Properly assigned
  • Added/updated tests
  • Added/updated documentation
  • Properly labeled

Additional Notes

Co-authored-by: Alexis Montagne <alexis.montagne@gmail.com>
@xgoffin xgoffin merged commit e361713 into master Feb 3, 2026
5 checks passed
@xgoffin xgoffin deleted the xg/VEL-5552/x/reporterlevel branch February 3, 2026 09:52
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.

5 participants