Grafana Loki

Use the Grafana Loki sink when you want log-style LoadStrike events in Loki and projected metrics through a companion OTLP path.

What this page helps you do

What this page helps you do

Use the Grafana Loki sink when you want log-style LoadStrike events in Loki and projected metrics through a companion OTLP path.

Who this is for

Teams exporting final run data and realtime metrics into supported observability backends.

Prerequisites

  • A run result or sink destination you want to wire into the wider observability stack

By the end

A sink-specific setup path that stays tied to the same LoadStrike report model.

Use this page when

Use this page when the local report is not the only destination and you need to wire realtime or final export into a supported sink.

Visual guide

Annotated report diagram showing summary, scenario views, and failure analysis.
The same run result powers summary reading, failure diagnosis, grouped correlation, and export flows.

Sample Report Data Rows

Scope    Scenario     Result Count RPS  LatencyP50Ms LatencyP80Ms LatencyP85Ms LatencyP90Ms LatencyP95Ms LatencyP99Ms
Scenario reports-demo OK     675   15.0 21.4         30.2         33.0         36.8         48.6         72.1

LatencyTable Scenario     Result Count LatencyP50Ms LatencyP95Ms
LatencyTable reports-demo OK     675   21.4         48.6
LatencyTable reports-demo FAIL   12    35.9         79.2

StatusCode Result Percent
200        OK     97.48
500        FAIL   2.52

FailedStatus Scope     Scenario     Step StatusCode Count Percent
FailedStatus Scenario  reports-demo      500       12    1.75

Reporting

Realtime reporting

Choose the built-in sink page that matches the backend your team already runs, or open Custom Reporting when you need to implement your own destination. Each tab opens a dedicated page with the settings, behavior, and lifecycle details for that reporting path.

Guide

When To Use Grafana Loki

Choose Grafana Loki when the team already indexes log-style observability events in Loki but still wants projected metrics available for dashboards and alerts.

What LoadStrike Sends

GrafanaLokiReportingSink writes reporting events to Loki and can send projected metrics through MetricsBaseUrl, MetricsEndpointPath, and MetricsHeaders to an OTLP/HTTP-compatible metrics endpoint.

Configuration Surface

Configure the sink in code or through LoadStrike:ReportingSinks:GrafanaLoki. Common options include BaseUrl, BearerToken, TenantId, StaticLabels, MetricsBaseUrl, MetricsEndpointPath, and MetricsHeaders.

Starter Assets

LoadStrike publishes a Loki datasource YAML, the shared Grafana dashboard-provider YAML, and a Loki overview dashboard JSON file.

Grafana Loki realtime reporting

Use GrafanaLokiReportingSink when you want reporting events in Loki and projected metrics through a companion OTLP/HTTP endpoint.

If you run these examples locally, add a valid runner key before execution starts. Set it with WithRunnerKey("...") or the config key LoadStrike:RunnerKey.

HTML reports also include the top-right Light/Dark theme toggle. Light is the default report theme.

Grafana Loki Sink

using LoadStrike;

var lokiSink = new GrafanaLokiReportingSink(new GrafanaLokiReportingSinkOptions
{
    BaseUrl = "https://loki.example.com",
    BearerToken = "loki-token",
    TenantId = "platform-team",
    MetricsBaseUrl = "https://otel-gateway.example.com",
    MetricsEndpointPath = "/v1/metrics",
    MetricsHeaders =
    {
        ["Authorization"] = "Bearer otlp-metrics-token"
    }
});

LoadStrikeRunner.RegisterScenarios(scenario)
    .WithReportingSinks(lokiSink)
    .WithRunnerKey("rkl_your_local_runner_key")
    .Run();

GrafanaLokiReportingSinkOptions fields

ConfigurationSectionPath

Defaults to LoadStrike:ReportingSinks:GrafanaLoki when binding from infra config.

BaseUrl

Required Loki base URL for log-style reporting events.

PushEndpointPath

Loki push path for log events.

BearerToken / Username / Password / TenantId

Authentication and tenancy fields used when the Loki backend requires them.

TimeoutSeconds

HTTP timeout for Loki writes.

StaticLabels

Labels applied to exported Loki streams.

MetricsBaseUrl

Optional OTLP/HTTP metrics endpoint base URL when projected metrics should go somewhere other than the Loki base URL.

MetricsEndpointPath

Metrics write path for the OTLP/HTTP metrics companion endpoint.

MetricsHeaders

Additional headers sent with projected metrics requests.

{
  "LoadStrike": {
    "ReportingSinks": {
      "GrafanaLoki": {
        "BaseUrl": "https://loki.example.com",
        "BearerToken": "loki-token",
        "MetricsBaseUrl": "https://otel-gateway.example.com",
        "MetricsEndpointPath": "/v1/metrics",
        "MetricsHeaders": {
          "Authorization": "Bearer otlp-metrics-token"
        }
      }
    }
  }
}

Downloads and starter assets

These downloads cover the public Grafana Loki workflow that LoadStrike documents today.

Loki datasource YAML

A Grafana datasource definition for a Loki-backed LoadStrike dashboard setup.

Download file

Dashboard provider YAML

The shared Grafana dashboard-provider file used by the published starter dashboards.

Download file

Loki dashboard JSON

A starter dashboard already wired for the Grafana Loki sink shape documented on this page.

Download file