Skip to content

Changing the payload.level in a transform callback has no impact on reported log level #1160

@whilestevego

Description

@whilestevego

Hi,

I'm trying to reclassify the log level of some Rollbar events with the transform callback by doing something like this:

transform(payload) {
 // ...
 if (exception) {
   if (exception?.class?.endsWith("ClientError") && exception?.message?.includes("ERR_BAD_RESPONSE")) {
     payload.level = "warning"
    }
  }
  // ...
}

This successfully changes the level property, but Rollbar still displays the event using the original log level. Here's a reported event where the level was changed using the above code:

Image

If this is intentional, is there another way to modify the level of incoming events? Otherwise, how can I get around this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions