Instrument in clouds and containers
Where to set the OpenTelemetry variables on AWS, Azure, Google Cloud, Railway, Kubernetes, Docker or systemd, and how to use the Collector as a bridge.
On this page
Instrumentation is the same everywhere: the standard OpenTelemetry variables from Instrument a server application. What changes is where you define them. The guides are in Settings → APM → API key and SDK, section SDK by language and other ways to send, Clouds and platforms tab.
Before you start
A server token and the ingest URL. See Create an ingest token.
The application already instrumented for its language.
OpenTelemetry Collector (bridge)
Use a Collector on your network when a system only speaks gRPC, when it has no internet access, or when you want to add host, cloud or Kubernetes data. The Collector receives OTLP over gRPC or HTTP and forwards to ARGUNIS over outbound HTTPS. It works on AWS, Azure, Google Cloud, Railway, on-premises or behind a VPN.
Copy the configuration from the OpenTelemetry Collector (bridge) guide (image
otel/opentelemetry-collector-contrib; pin the version). The exporter points to your ingest URL with the token in a Collector variable:
exporters:
otlphttp/argunis:
endpoint: https://URL_DE_INGESTA
headers: { Authorization: "Bearer ${env:ARGUNIS_APM_TOKEN}" }
compression: gzipYour applications point to the Collector, without a token:
OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318AWS (EC2, ECS, EKS, Lambda)
Define the
OTEL_*variables in the task definition (ECS), the Deployment (EKS), the function configuration (Lambda) or the system service (EC2).Store the token in Secrets Manager or Parameter Store.
AWS detectors: in Node
OTEL_NODE_RESOURCE_DETECTORS=all; in Java-Dotel.resource.providers.aws.enabled=true; in Python installopentelemetry-sdk-extension-awsand setOTEL_EXPERIMENTAL_RESOURCE_DETECTORS=aws_ec2,aws_ecs,aws_eks.On Lambda, use the official OpenTelemetry layer for your language and add
AWS_LAMBDA_EXEC_WRAPPER=/opt/otel-handlerto the variables.
Azure (VM, App Service, AKS, Functions)
Define the variables in Application settings (App Service and Functions), in the Deployment (AKS) or in the service (VM).
Store the token in Key Vault.
Azure detectors: Node
OTEL_NODE_RESOURCE_DETECTORS=all; Java-Dotel.resource.providers.azure.enabled=true; .NETOTEL_DOTNET_AUTO_AZURE_APP_SERVICE_RESOURCE_DETECTOR_ENABLED=true; Pythonpip install opentelemetry-resource-detector-azure.
Google Cloud (GCE, GKE, Cloud Run)
Define the variables in the Cloud Run service, the GKE Deployment or the instance.
Store the token in Secret Manager.
Detectors: Node
OTEL_NODE_RESOURCE_DETECTORS=all; Java-Dotel.resource.providers.gcp.enabled=true; Pythonpip install opentelemetry-resourcedetector-gcp.
Railway
If you already monitor your Railway services in ARGUNIS, the APM service links automatically to its Railway service when the railway.service.id (or railway.service.name) attribute arrives.
Define the
OTEL_*variables in the Railway service.In the start command, add the Railway identifiers as resource attributes:
OTEL_RESOURCE_ATTRIBUTES="railway.service.id=$RAILWAY_SERVICE_ID,railway.project.id=$RAILWAY_PROJECT_ID,railway.environment.id=$RAILWAY_ENVIRONMENT_ID,railway.environment.name=$RAILWAY_ENVIRONMENT_NAME,deployment.environment.name=$RAILWAY_ENVIRONMENT_NAME" node --import @opentelemetry/auto-instrumentations-node/register dist/server.jsIf you define OTEL_RESOURCE_ATTRIBUTES as a Railway variable (not in the command), write ${{RAILWAY_SERVICE_ID}}. The $RAILWAY_SERVICE_ID form is only replaced inside a shell.
Kubernetes (any cloud or on-premises)
With the OpenTelemetry Operator, pods are instrumented automatically with an annotation (Java, Node, Python, .NET and Go).
Create a secret with the token header:
kubectl create secret generic argunis-apm --from-literal=headers='Authorization=Bearer%20jtk_TU_TOKEN_DE_SERVIDOR'Create the
Instrumentationresource shown in the Kubernetes guide, with your ingest URL asendpointand the secret inOTEL_EXPORTER_OTLP_HEADERS.Annotate the Deployment according to the language:
instrumentation.opentelemetry.io/inject-java: "argunis"
instrumentation.opentelemetry.io/inject-nodejs: "argunis"
instrumentation.opentelemetry.io/inject-python: "argunis"
instrumentation.opentelemetry.io/inject-dotnet: "argunis"Docker and your own servers
The same variables go in docker-compose.yml (the environment block), in the systemd unit (Environment="...") or in the Windows service. The Docker / your own servers guide shows them already written in both formats.
ARGUNIS links the service to the inventory server by host.name.
What happens next
The service appears in APM → Services with the Where it runs column (for example, the cloud, the cluster or the server) and, if ARGUNIS could link it, the inventory group under Link.