Instrument Your Application¶
Subscription required
This section describes functionality which requires an active IAPM subscription. Start your subscription by choosing the plan right for you.
Send traces, metrics, and logs from your application to IAPM using standard OpenTelemetry. No proprietary SDKs required - use the same open-source libraries the industry relies on.
Quick Configuration¶
All you need is your OTLP endpoint and API key:
| Setting | Value |
|---|---|
| Endpoint | https://otlp.iapm.app |
| Protocol | grpc (default) or http/protobuf |
| API Key Header | API-Key: YOUR-API-KEY |
Get your API key by logging in at portal.iapm.app, then go to Administration > Grids and click Instrument on your Grid.
Environment Variables¶
The fastest way to configure any OpenTelemetry SDK is with environment variables. These work across all languages:
| Variable | Value | Description |
|---|---|---|
OTEL_EXPORTER_OTLP_ENDPOINT | https://otlp.iapm.app | OTLP collector endpoint |
OTEL_EXPORTER_OTLP_HEADERS | API-Key=YOUR-API-KEY | Authentication header |
OTEL_SERVICE_NAME | your-service-name | Identifies your service in IAPM |
Quick Start by Language¶
Choose your language to see the minimal configuration needed to start sending telemetry:
// Program.cs
builder.Services.AddOpenTelemetry()
.WithTracing(tracing => tracing
.AddAspNetCoreInstrumentation()
.AddHttpClientInstrumentation()
.AddOtlpExporter(options =>
{
options.Endpoint = new Uri("https://otlp.iapm.app");
options.Headers = "API-Key=YOUR-API-KEY";
}))
.WithMetrics(metrics => metrics
.AddAspNetCoreInstrumentation()
.AddOtlpExporter(options =>
{
options.Endpoint = new Uri("https://otlp.iapm.app");
options.Headers = "API-Key=YOUR-API-KEY";
}));
# Download the OpenTelemetry Java agent
curl -L -o opentelemetry-javaagent.jar \
https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/latest/download/opentelemetry-javaagent.jar
# Run your application with auto-instrumentation
java -javaagent:opentelemetry-javaagent.jar \
-Dotel.exporter.otlp.endpoint=https://otlp.iapm.app \
-Dotel.exporter.otlp.headers=API-Key=YOUR-API-KEY \
-Dotel.service.name=your-service-name \
-jar your-app.jar
npm install @opentelemetry/sdk-node \
@opentelemetry/exporter-trace-otlp-grpc \
@opentelemetry/exporter-metrics-otlp-grpc \
@opentelemetry/auto-instrumentations-node
// tracing.js - require this before your app
const { NodeSDK } = require('@opentelemetry/sdk-node');
const { OTLPTraceExporter } = require('@opentelemetry/exporter-trace-otlp-grpc');
const { getNodeAutoInstrumentations } = require('@opentelemetry/auto-instrumentations-node');
const sdk = new NodeSDK({
traceExporter: new OTLPTraceExporter({
url: 'https://otlp.iapm.app',
headers: { 'API-Key': 'YOUR-API-KEY' },
}),
instrumentations: [getNodeAutoInstrumentations()],
});
sdk.start();
import (
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"
"google.golang.org/grpc/credentials"
)
exporter, err := otlptracegrpc.New(ctx,
otlptracegrpc.WithEndpoint("otlp.iapm.app:443"),
otlptracegrpc.WithHeaders(map[string]string{
"API-Key": "YOUR-API-KEY",
}),
otlptracegrpc.WithTLSCredentials(credentials.NewClientTLSFromCert(nil, "")),
)
What Gets Collected¶
Once configured, OpenTelemetry captures three types of telemetry:
| Signal | What It Captures | Examples |
|---|---|---|
| Traces | Request flows across services | HTTP requests, database calls, message queue operations |
| Metrics | Performance measurements over time | Request latency, CPU usage, error rates, queue depth |
| Logs | Application log events | Errors, warnings, structured log entries |
All three signal types are sent to the same OTLP endpoint. IAPM correlates them automatically so you can navigate from a metric spike to the traces and logs that explain it.
Verify It's Working¶
After deploying your instrumented application:
- Generate some traffic by making a few requests to your application
- Open portal.iapm.app and select your Grid
- Click Enter to open the IAPM experience
- You should see your service and its telemetry data within a few minutes
Not seeing data?
- Verify your API key is correct (copy it fresh from Administration > Grids > Instrument)
- Check that your application can reach
https://otlp.iapm.appon port 443 - Ensure the
OTEL_SERVICE_NAMEis set so your service is identifiable - Look for OpenTelemetry errors in your application logs
- Try the troubleshooting section in your language-specific guide
Language Guides¶
Detailed setup instructions for each language and platform:
| Guide | Coverage |
|---|---|
| .NET | ASP.NET Core, console apps, worker services, logging integration |
| Java | Java agent, Spring Boot, Maven/Gradle, manual instrumentation |
| Python | Django, Flask, FastAPI, auto-instrumentation |
| Node.js | Express.js, NestJS, auto-instrumentation |
| Go | net/http, gRPC, manual spans |
| Kubernetes | OTel Operator, Collector DaemonSet, Helm charts |
| Collector | OTel Collector configuration, Docker, Kubernetes deployment |
Further Reading¶
- OpenTelemetry Documentation - Official OpenTelemetry reference
- OpenTelemetry Language SDKs - SDK documentation by language