Send Traces to the Platform
You can send traces to the Tracing Service using OpenTelemetry SDKs, agents, and the OpenTelemetry Collector.
This quick start shows how to create a pipeline, get a key, and configure an exporter.
Prerequisites
An IONOS CLOUD account with permissions to create tracing pipelines.
A tracing pipeline in
AVAILABLEstate.Outbound
HTTPSaccess on port443.An instrumented application, OpenTelemetry SDK, or OpenTelemetry Collector.
Create a pipeline
Send a POST request to the Tracing Service API:
curl --location \
--request POST 'https://tracing.de-txl.ionos.com/pipelines' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer $TOKEN' \
--data '{
"metadata": {},
"properties": {
"name": "orders-prod",
"protocol": "otlp-http"
}
}'The response includes the protocol-specific ingestion endpoint and the key. Save both values.
API key usage
Use the key returned when you created the pipeline for authentication.
You must generate a new one only in specific cases, such as:
The key was accidentally shared.
The key was lost.
A team member with access left the company.
For authentication:
OTLP/HTTPexporters must send the key in theapikeyheader.OTLP/gRPCexporters must send the key asapikeymetadata.
Obtain the pipeline endpoint
After creating a pipeline, use the returned protocol-specific endpoint. Throughout this guide, <tracing-ingestion-endpoint> refers to the ingestion endpoint — a unique hostname generated for that pipeline. It is not the management API host (tracing.<region>.ionos.com) you used to create the pipeline.
For example, the response's otlpEndpoint might look like:
https://<pipeline>-traces.<tenant>.tracing.<region>.ionos.com/v1/tracesUse the returned protocol-specific endpoint:
For
otlp-http:https://<tracing-ingestion-endpoint>/v1/tracesFor
otlp-grpc:grpcs://<tracing-ingestion-endpoint>/v1/traces
Configure an exporter
Each exporter requires the pipeline endpoint and the key.
Use the pipeline otlpEndpoint and send the key in the apikey header.
Example OpenTelemetry Collector configuration:
exporters:
otlphttp/ionos:
endpoint: "https://<tracing-ingestion-endpoint>/v1/traces"
headers:
apikey: "<API_KEY>"
service:
pipelines:
traces:
exporters: [otlphttp/ionos]Use the pipeline gRPC endpoint and send the key as apikey metadata.
Example OpenTelemetry Collector configuration:
exporters:
otlp/ionos:
endpoint: "<tracing-ingestion-endpoint>:443"
headers:
apikey: "<API_KEY>"
tls:
insecure: false
service:
pipelines:
traces:
exporters: [otlp/ionos]OpenTelemetry SDK examples
The following examples show how to configure common OpenTelemetry SDKs to send traces to Tracing Service.
Set the following environment variables:
Example SDK setup:
If you use the OpenTelemetry Java agent, configure it with environment variables:
Set the following environment variables:
Example SDK setup:
Set the following environment variables:
Example SDK setup:
Set the following environment variables:
In .NET applications that use OpenTelemetry, the exporter can then use the same runtime configuration through the standard OTEL_ environment variables.
Troubleshooting
Verify pipeline state: Confirm the pipeline is
AVAILABLE.Invalid key: Check that you copied the latest pipeline key.
Connection errors: Verify outbound
HTTPSaccess on port443.No traces displayed: Confirm that your application is instrumented and exporting spans.
Protocol mismatch: Make sure
otlp-httpexporters use the HTTP endpoint andotlp-grpcexporters use thegRPCendpoint.
Last updated
Was this helpful?