Skip to main content
Gå til innhold

Getting started - External Services

If your application runs outside Platon PaaS and Puppet-managed VMs (for example in your own Kubernetes cluster, on a cloud provider or on manually managed servers), you can ship telemetry to Platon's backends as long as you authenticate.

You can ship structured logs alone, or all three signals with OpenTelemetry. Use the section that matches your setup.

Request access​

Contact the Platon team on #platon-observability (Slack) with:

  1. A tenant name for your team or product
  2. The Microsoft Entra ID group that should have access to Grafana

We will provide you with:

  • Username and password for authentication
  • Tenant name confirmation
  • Endpoint URLs

Authentication​

All requests to the observability backends must include two headers:

  1. The basic authentication header, Authorization: Basic <base64(username:password)>
  2. The tenant header, X-Scope-OrgID: <your-tenant-name>

You write directly to the backends, so you set your tenant yourself with the X-Scope-OrgID header. In the PaaS setup, Alloy handles tenancy, and an application there does not set any tenant header.

Shipping logs only​

This path is for teams that rely mainly on structured logs for observability.

Run a log collector (Grafana Alloy, Vector or the OpenTelemetry Collector) that reads logs from your hosts or containers and forwards them to Loki with the authentication headers above.

Example: Vector configuration for logs​

sinks:
loki:
type: loki
endpoint: "https://<loki-endpoint>"
auth:
strategy: basic
user: "<username>"
password: "<password>"
labels:
tenant: "<your-tenant>"
out_of_order_action: accept
request:
headers:
X-Scope-OrgID: "<your-tenant>"

Shipping OpenTelemetry (logs, metrics, and traces)​

If your services are instrumented with OpenTelemetry and you want to ship all three signals, run a collector (Alloy or the OpenTelemetry Collector) that receives OTLP from them and forwards each signal to the appropriate backend.

Example: application environment​

Set these environment variables in each service that exports OTLP to your collector. This path bypasses Platon's in-cluster Alloy, so Platon does not fill in any of these values for you.

OTEL_SERVICE_NAME=<your-service-name>
OTEL_RESOURCE_ATTRIBUTES=service.namespace=<your-team-or-application>,deployment.environment.name=production,service.version=<version>

Without OTEL_SERVICE_NAME the SDK falls back to unknown_service:<executable>. Set service.namespace too, because the job label on your metrics and the Logs for this span link both use it. Use production or development as the value of deployment.environment.name, so it matches the values Alloy derives on Platon PaaS. The older name, deployment.environment, becomes a label in neither Loki nor Mimir.

Keep the default exemplar filter, trace_based. It picks measurements recorded inside a sampled span, which are the only ones that carry the ID of a trace in Tempo. OTEL_METRICS_EXEMPLAR_FILTER=always_on also picks measurements from outside sampled spans, and their exemplars cannot open a trace. Metrics — Exemplars lists which SDKs support exemplars. If a link between signals doesn't show up, see When a link is missing.

Example: OpenTelemetry Collector configuration​

extensions:
basicauth/client:
client_auth:
username: "<username>"
password: "<password>"

exporters:
otlphttp/loki:
endpoint: "https://<loki-endpoint>/otlp"
auth:
authenticator: basicauth/client
headers:
X-Scope-OrgID: "<your-tenant>"
otlphttp/mimir:
endpoint: "https://<mimir-endpoint>/otlp"
auth:
authenticator: basicauth/client
headers:
X-Scope-OrgID: "<your-tenant>"
otlp/tempo:
endpoint: "<tempo-endpoint>"
auth:
authenticator: basicauth/client
headers:
X-Scope-OrgID: "<your-tenant>"

service:
extensions: [basicauth/client]
pipelines:
logs:
exporters: [otlphttp/loki]
metrics:
exporters: [otlphttp/mimir]
traces:
exporters: [otlp/tempo]

If you are new to OpenTelemetry itself, start with the tutorial. This page covers only the setup that is specific to External Services.

View your data​

Once data is flowing:

  1. Go to grafana.platon.sikt.no. You are automatically logged in with Entra ID.
  2. Select your organization.
  3. Use Explore to query your data.

Next steps​