Instrumenting your services

Attach the agent (JVM) or any OpenTelemetry SDK; verify your first trace.

apminstrumentationoteljavaagentconfig

Instrumenting your services

Instrumentation attaches an agent (or OpenTelemetry SDK) to your service so it emits traces. For common frameworks this needs no code changes.

You will need

  • Your ingest key (Settings → API keys).
  • The OTLP endpoint: https://ingest.verops.io.
  • A service name and environment (e.g. prod).

Java (JVM) — attach the agent

java -javaagent:/path/verops-agent.jar \
  -Dverops.otlp.endpoint=https://ingest.verops.io/v1/traces \
  -Dverops.api.key=$VEROPS_INGEST_KEY \
  -Dverops.service.name=checkout-api \
  -Dverops.environment=prod \
  -jar your-app.jar

Any language — OpenTelemetry environment variables

VerOps ingests standard OTLP, so any OpenTelemetry SDK/Collector works:

export OTEL_EXPORTER_OTLP_ENDPOINT=https://ingest.verops.io
export OTEL_EXPORTER_OTLP_HEADERS=authorization=Bearer%20$VEROPS_INGEST_KEY
export OTEL_SERVICE_NAME=checkout-api
export OTEL_RESOURCE_ATTRIBUTES=deployment.environment=prod

Containers

Bake the agent into the image or mount it, and pass the same settings as environment variables in your docker run / Kubernetes manifest.

Verify it works

  1. Send some traffic to the service.
  2. Within ~1 minute it appears on the service map.
  3. Open Traces and filter by your service name; you should see live traces.

Best practices

  • Use consistent service names and an explicit environment so prod and staging don't mix.
  • Add a few custom attributes (tenant id, route) to make traces searchable.
  • Sample high-volume services if needed; keep errors always-on.