grafana / faro-web-sdk

The Grafana Faro Web SDK, part of the Grafana Faro project, is a highly configurable web SDK for real user monitoring (RUM) that instruments browser frontend applications to capture observability signals. Frontend telemetry can then be correlated with backend and infrastructure data for full-stack observability.
https://grafana.com/oss/faro/
Apache License 2.0
688 stars 62 forks source link

pushError loses context data #486

Open codecapitano opened 4 months ago

codecapitano commented 4 months ago

Description

Context data attached to a error via the context object gets lost in the backend when using Grafana Agent.

aro.api.pushError(error, {
  type: 'network',
  context: {
      message: 'React error boundary',
      componentStackTrace: {...}
    },
});

The issue was reported on the Faro community Slack. I tested it with the Faro Receiver in cloud and the Grafana Agent. Faro receiver works well, but when using the Agent the context attributes do not appear in the Loki log.

Steps to reproduce

I started the Demo app which uses the Grafana Agent and sent a custom error with context attributes attached. The context attributes did not show up in the error log.

Then I started the fe-o11y plugin, which is using the Faro receiver, locally and sent a custom error with context attributes attached as well. The context attributes showed up in the error log as excpected.

Expected behavior

Context attributes should appear in the Loki log.

Actual behavior

context attributes do not appear in the Loki log.

Environment

Demo

Context

sebastianbaron commented 3 weeks ago

Having this exact same issue, any updates / fixes in sight?