General availability (GA) Open source Grafana Cloud

faro.receiver

faro.receiver accepts web application telemetry data from the Grafana Faro Web SDK and forwards it to other components for processing.

Note

This component does not work with Grafana Cloud Frontend Observability. For more information, refer to the Choose a component guide.

Usage

Alloy
faro.receiver "<LABEL>" {
    output {
        logs   = [<LOKI_RECEIVERS>]
        traces = [<OTELCOL_COMPONENTS>]
    }
}

Arguments

You can use the following arguments with faro.receiver:

NameTypeDescriptionDefaultRequired
extra_log_labelsmap(string)Extra labels to attach to emitted log lines.{}no
log_formatstringExport format for the logs."logfmt"no

Log format

The following strings are valid log line formats:

  • "json": Export logs as JSON objects.
  • "logfmt": Export logs as logfmt lines.

Blocks

You can use the following blocks with faro.receiver:

output

Required

The output block specifies where to forward collected logs and traces.

NameTypeDescriptionDefaultRequired
logslist(LogsReceiver)A list of loki components to forward logs to.[]no
traceslist(otelcol.Consumer)A list of otelcol components to forward traces to.[]no

server

The server block configures the HTTP server managed by the faro.receiver component. Clients using the Grafana Faro Web SDK forward telemetry data to this HTTP server for processing.

NameTypeDescriptionDefaultRequired
listen_addressstringAddress to listen for HTTP traffic on."127.0.0.1"no
listen_portnumberPort to listen for HTTP traffic on.12347no
cors_allowed_originslist(string)Origins for which cross-origin requests are permitted.[]no
api_keysecretOptional API key to validate client requests with.""no
max_allowed_payload_sizestringMaximum size (in bytes) for client requests."5MiB"no
include_metadataboolPropagate incoming connection metadata to downstream consumers.falseno

By default, telemetry data is only accepted from applications on the same local network as the browser. To accept telemetry data from a wider set of clients, modify the listen_address attribute to the IP address of the appropriate network interface to use.

The cors_allowed_origins argument determines what origins browser requests may come from. The default value, [], disables CORS support. To support requests from all origins, set cors_allowed_origins to ["*"]. The * character indicates a wildcard.

You can use the following headers for cross-domain requests: Content-Type, Content-Encoding, Idempotency-Key, Traceparent, X-API-Key, X-Faro-Session-Id, or X-Scope-OrgID.

Browser clients can read the Retry-After response header when it’s present.