--- title: Instrument your project with an AI assistant description: Connect an existing application to Corridora using OpenTelemetry, and verify the signals from a real request. label: Instrument your project order: 10 --- # Instrument your project with an AI assistant Connect an existing application to Corridora using OpenTelemetry, and verify the signals from a real request. Give your assistant the [AI documentation index](/llms.txt) and this guide. Every documentation page has a **Read as Markdown** link. These files refresh when the site builds from the documentation repository; the index is a discovery convention, so explicitly provide its URL when your assistant does not discover it automatically. ## Start with this prompt ```text Add OpenTelemetry to this project and export the intended signals to Corridora. Read https://www.corridora.ai/llms.txt and the instrumentation guide first. Inspect the runtime, framework, deployment entrypoint, and existing telemetry. Preserve existing providers, exporters, and Collector pipelines. Use environment variables or secret references for credentials. Add a local acceptance test that exercises a real application request. Report which signals were exported and which were confirmed stored in Corridora. ``` Supply the deployment's documentation URL if you use a different corporate hostname. For repeated use, download the [Corridora instrumentation skill](skills/corridora-instrumentation/SKILL.md), review it, and place it in a `corridora-instrumentation/SKILL.md` folder in your assistant's supported skill directory. Follow the assistant's own installation instructions; this website does not install anything into your project automatically. ## Gather the connection details | Input | Example or decision | | --- | --- | | Runtime and framework | Existing Node.js/Express or Python/FastAPI project, with runtime and dependency versions. | | Process startup | Actual production command, module format, worker model, container or serverless lifecycle. | | Export destination | Direct to the supplied Corridora HTTPS ingest base URL, or to an existing private Collector receiver. | | Credential reference | Environment variable or secret-manager reference for an **ingest** key. Keep the Corridora key on the Collector when it handles export. | | Service identity | Stable service name, namespace if used, environment, and application version. | | Intended signals | Request traces, selected application logs, application metrics, or separately configured browser RUM. | | Acceptance workload | A safe real request or job and its expected service, operation, log message, and metric. | The assistant can inspect source files and dependency manifests to discover project details. Ask for missing deployment values while continuing local implementation. Do not invent an ingest host or use a query/management key as an ingest key. Avoid pasting secrets into chat; configure them through your normal environment or secret store. Read [connection and identity settings](../collect/setup/common.md) and the [ingest reference](../reference/ingest.md). Projects in Corridora group configured services; a header or resource attribute does not create a project. ## Adapt the existing instrumentation Inspect the dependency lockfile, entrypoint, preload or wrapper commands, logger, and Collector configuration before adding packages. Identify who owns each SDK provider and how each signal leaves the application. If the application already uses OpenTelemetry, extend its existing setup. Keep working exporters and processors unless changing them is part of the requested migration. Merge Collector receivers, processors, exporters, and pipelines into their existing mappings. Avoid creating a second provider, wrapping an already instrumented Python process again, or instrumenting Express after it has loaded. For a new setup, use the tested [Express recipe](node-express.md) or [FastAPI recipe](python-fastapi.md) as a reference. These server installers add collection to an existing systemd service and target Corridora through a dedicated loopback Collector. They include pinned agent dependencies, startup integration, dry-run and rollback modes. Read their supported runtime and service requirements before applying changes; other deployment models need their own startup integration. Use the broader [language directory](../collect/setup/backend/languages/README.md) for other runtimes. Preserve each guide's signal coverage and lifecycle qualifications. `console.log` or a JSON log line alone is not an OTLP log pipeline, and trace instrumentation alone does not enable all application metrics. ## Configure export and identity Standard settings supported by many SDKs include: ```sh OTEL_SERVICE_NAME=checkout-api OTEL_RESOURCE_ATTRIBUTES=service.namespace=commerce,service.version=1.0.0,deployment.environment.name=staging OTEL_EXPORTER_OTLP_ENDPOINT=https://YOUR_INGEST_HOST OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf ``` For direct backend export, supply `OTEL_EXPORTER_OTLP_HEADERS` with `X-CORRIDORA-KEY` using the deployment's secret mechanism. Choose the protocol actually implemented by the recipe: the Express recipe uses HTTP/JSON; the FastAPI recipe uses HTTP/protobuf. Not every SDK honors every standard environment variable, so check the selected exporter and its constructor settings. The shared endpoint is a **base URL**. Signal-specific endpoint settings generally need the complete `/v1/traces`, `/v1/logs`, or `/v1/metrics` path. Inspect existing per-signal overrides before changing shared settings; stale overrides can keep sending a signal to its old destination. Public gRPC exposure is deployment-specific. For a Collector path, point the application at the private receiver and keep the Corridora destination and key in the Collector exporter. Follow the [Collector guide](../collect/collector.md). Keep sensitive payloads, request bodies, and unbounded metric labels out of the initial instrumentation. If the Collector serves multiple applications or organizations, scope the new export to the intended services and receiving organization. Adding Corridora to a shared pipeline can forward every application's telemetry in that pipeline. Preserve working exports and use the deployment's supported routing or a dedicated pipeline where needed. ## Test the application locally Run the integrations repository's disposable server validation fixture or add an equivalent check to the project's existing test setup. It should exercise real request instrumentation, decode the resulting OTLP payloads, and assert service identity, propagated trace IDs, correlated log fields, and the expected metric. Do not substitute a hand-built telemetry payload for testing the application's SDK setup. The server fixture uses a synthetic HTTPS Corridora-format receiver and synthetic data; its service-control layer is simulated. Their pass result proves local instrumentation and export. It does not prove Corridora authentication, routing, retention, or storage. ## Verify the result in Corridora Use the [quick start](../start/quick-start.md) to diagnose destination connectivity independently. Then follow [instrumentation verification](../collect/setup/verification.md) with the real application's workload: 1. Run a controlled request or job and record the UTC time, service, and trace ID. Allow batch export and metric collection intervals, and flush short-lived processes. 2. Select the intended organization and time window in Corridora. Find the request trace and check its operation, resource attributes, status, and parent relationships. 3. Find the application log and inspect its actual trace ID and span ID fields. Check the expected metric name, unit, resource identity, and fresh points over more than one interval. 4. For multiple services, check propagation across a real downstream boundary. Exercise a representative failure and graceful shutdown. 5. Record versions, sanitized settings, test time, representative identifiers, and an explicit result for each intended signal. An ingest `200` is an acknowledgement, not proof that records were stored. Report **local export verified; Corridora storage pending** when the assistant cannot inspect stored data. If a supported query integration is available, use a separate read-only query credential for that check; this initial workflow does not include an automatic Corridora query client. ## Add browser telemetry separately Use the [browser RUM guide](../collect/browser-rum.md) and [browser-to-backend investigation guide](../../operator/investigate/browser-to-backend.md). The browser RUM credential is intentionally visible to the browser; backend ingest and query/management credentials belong on servers. Coordinate with any existing browser OTel providers, configure propagation for the exact intended backend origins, and verify CORS and the shared trace ID through a real browser request. ## Keep the setup maintainable Include the instrumentation files, dependency changes, startup integration, environment-variable names, intended signals, and acceptance command in the project's own documentation. Retest after SDK, framework, Collector, routing, or sampling changes. Keep deployment changes and final production verification explicit in the handoff.