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
750 stars 66 forks source link

Traces have wrong Trace Start time #81

Open mjovanovic0 opened 1 year ago

mjovanovic0 commented 1 year ago

Description

After the setup of the LGTM stack with Faro and Grafana Agent receiver, and configuring React app the same way as it is a demo application, tracers are received and able to browse them in Tempo but they all have the wrong Trace Start time. Logs on the other hand in Loki have the correct time.

trace

Agent configuration:

metrics:
  wal_directory: /tmp/wal
  global: {}
  configs:
    - name: default
      remote_write:
        - url: http://prometheus.app:9090/api/v1/write
logs:
  positions_directory: /tmp/loki-pos
  configs:
    - name: default
      clients:
        - url: http://loki..app:3100/loki/api/v1/push
      scrape_configs:
      - job_name: frontend-core-ui
        pipeline_stages:
          - logfmt:
              mapping:
                timestamp: timestamp
          - timestamp:
              format: "2006-01-02 15:04:05.000 -0700 MST"
              source: timestamp
          - output:
              source: output
        static_configs:
          - labels:
              job: frontend-core-ui

traces:
  configs:
    - name: default
      remote_write:
        - endpoint: tempo.app:4317
          insecure: true
          tls_config:
            insecure_skip_verify: true
      receivers:
        otlp:
          protocols:
            grpc:
            http:
              cors:
                allowed_origins:
                  - http://localhost:8080
                max_age: 7200

integrations:
  app_agent_receiver_configs:
    - autoscrape:
        enable: true
        metrics_instance: 'default'
      instance: 'frontend-core-ui'
      logs_instance: 'default'
      traces_instance: 'default'
      server:
        host: 0.0.0.0
        port: 8081
        cors_allowed_origins:
          - 'http://localhost:3000'
      logs_labels: # labels to add to loki log record
        job: frontend-core-ui
        kind: # value will be taken from log items. exception, log, measurement, etc
        Time:
        timestamp:
      logs_send_timeout: 5000
      sourcemaps:
        download: true

Don't know where to look anymore for potential fix...

Environment

bfmatei commented 1 year ago

Hello!

I started investigating this as I can reproduce it locally.

eskirk commented 1 year ago

@bfmatei doing some board cleaning, did we resolve this?