Public documentation

Documentation indexRead as Markdown

Akamai: preserve context to an instrumented origin

Use an Akamai delivery property to serve the RUM-enabled frontend and forward API requests to an instrumented origin. The origin can run on Akamai Cloud/Linode or another VM/container platform. It exports traces to Corridora using a standard OpenTelemetry SDK.

This integration measures the browser and origin application. Delivery logs and EdgeWorkers execution are not automatically application spans.

Prerequisites

  • An existing property, hostname, certificate, and working HTTPS origin route.
  • Property Manager permission to create, validate, and activate a new property version in the intended staging/production network.
  • An origin with application instrumentation and outbound HTTPS access to Corridora.
  • A backend Corridora ingest key stored securely at the origin, and a separate browser RUM key in the same organization.

Use the host guide or Docker guide for deployment. The language guides cover SDK initialization and inbound/outbound context handling.

Configure the origin exporter

Start with the common cloud settings, using a stable service name such as shop-api-akamai. A standard SDK configuration includes:

OTEL_SERVICE_NAME=shop-api-akamai
OTEL_TRACES_EXPORTER=otlp
OTEL_METRICS_EXPORTER=none
OTEL_LOGS_EXPORTER=none
OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
OTEL_EXPORTER_OTLP_ENDPOINT=https://ingest.corridora.ai
OTEL_EXPORTER_OTLP_HEADERS=X-CORRIDORA-KEY=YOUR_BACKEND_INGEST_KEY
OTEL_PROPAGATORS=tracecontext,baggage
OTEL_TRACES_SAMPLER=parentbased_always_on

Supply the populated header through the origin's secret-management workflow. Set environment, namespace, and release attributes as described in the common settings. Add exporter packages and initialize instrumentation before the application handles requests.

For an already built instrumented image on a Docker host, with a protected environment file and an existing HTTPS reverse proxy:

export IMAGE=YOUR_REGISTRY/shop-api:YOUR_RELEASE
docker run -d --name shop-api --restart unless-stopped \
  --env-file /etc/shop-api/telemetry.env \
  -p 127.0.0.1:8080:8080 \
  "$IMAGE"

The image must listen on 0.0.0.0:8080 inside the container. The reverse proxy connects to host loopback port 8080. Preserve the incoming context at this proxy as well as at Akamai; keep application authentication and TLS intact.

Configure the API property rule

Create a rule for the application API path, such as /api/*, with the intended API origin. Select a caching behavior that serves these requests from the origin. The following is a behavior fragment for a supported property rule format:

{
  "name": "caching",
  "options": {
    "behavior": "BYPASS_CACHE"
  }
}

BYPASS_CACHE serves from the origin while retaining existing cached objects. It is not a cache purge. Merge the fragment into your property's supported rule tree; do not replace the whole property with it. Keep static-asset caching separate.

Review inherited and later outgoing-request-header rules. They must preserve the incoming traceparent for a forwarding-only path. Do not set a single literal trace ID as an outgoing header. Preserve server-to-server tracestate where your instrumentation uses it, and do not copy diagnostic context into authorization fields.

Validate the changed property version, activate it on staging, and test the edge hostname through the normal Akamai staging procedure. Promote only after verifying routing, authentication, caching, and context. The behavior schema and available settings depend on the property's rule format and product.

Install browser telemetry

Add the generated Corridora RUM tag to the frontend template. An API under the same page origin is eligible for trace injection. For a separate API hostname, allow its exact HTTPS origin in data-trace-origins.

Preserve the origin's CORS headers on the response and allow preflight through security rules. The API's allowed request headers must include traceparent. Retain the application's existing cookie/credential and authorization requirements.

Keep the verification route uncached at every layer. A reused response containing a previous request's trace ID cannot validate a new browser request.

Verify the complete route

  1. Verify the origin directly through an authorized test path to establish that it creates and exports spans.
  2. Make a browser fetch through the Akamai-served hostname after RUM initializes.
  3. Compare the browser header, active origin trace ID, and stored browser/backend spans in Corridora.
  4. If the trace splits only through the edge, inspect property rule ordering and intermediate proxy headers.
  5. Repeat after production activation and after an origin rollout.

Use deployment verification for the expected parentage checks. A forwarding-only path should retain the browser span as the server span's parent; an instrumented intermediary creates an additional parent/child hop.

EdgeWorkers boundary

If EdgeWorkers responds without calling the origin, no origin SERVER span exists for that request. This recipe does not install an OpenTelemetry SDK in EdgeWorkers or claim a supported Node auto-instrumentation path there.

If edge execution time must be measured separately, evaluate a runtime-compatible instrumentation/export implementation and verify context and delivery explicitly. Header pass-through alone connects browser and origin; it does not create an edge span.