Connecting infrastructure
Anything that speaks OpenTelemetry can send to Sophonz. This page covers which signals Sophonz stores, where database and broker telemetry comes from, and how to forward it through your own OpenTelemetry Collector.
Sophonz ingests standard OTLP. A database, a cache, or a message broker does not need a Sophonz-specific agent: whatever produces OTLP traces or logs and carries a valid service.key is stored and joined to the rest of the trace. This page sets out what is accepted, and the pages for each system show which OpenTelemetry instrumentation produces it.
What Sophonz stores
| Signal | Endpoint | Status |
|---|---|---|
| Traces | https://in.sophonz.ai/v1/traces | Stored |
| Logs | https://in.sophonz.ai/v1/logs | Stored |
| Metrics | https://in.sophonz.ai/v1/metrics | Not accepted. The endpoint answers 404 |
Infrastructure visibility in Sophonz is therefore built from spans and logs. Collector receivers that scrape a server and emit metrics only, such as the Redis, MySQL, Kafka metrics, and RabbitMQ receivers, have nowhere to land and are not covered in these pages.
Where the telemetry comes from
| Source | What it shows | Available for |
|---|---|---|
| Client spans | Each call the application made to the system, with its duration and outcome, inside the request's trace | Every system below |
| Producer and consumer spans | A message followed from the service that published it to the service that processed it | Kafka, RabbitMQ |
| Server-side spans | What the system did internally while the application waited | PostgreSQL with pg_tracing |
| Logs | Events that are not spans | Anything that can deliver OTLP logs |
Client spans come from the OpenTelemetry instrumentation library for the client your application already uses. They need no change to the database or broker, which is why they work the same on self-hosted and cloud-managed deployments.
| System | Page |
|---|---|
| PostgreSQL | PostgreSQL instrumentation |
| MySQL | MySQL |
| Redis | Redis |
| Kafka | Kafka |
| RabbitMQ | RabbitMQ |
| MongoDB | MongoDB |
A system that is not listed follows the same rule. If an OpenTelemetry instrumentation exists for its client, the spans arrive through the SDK you already configured.
The ingest contract
Every sender, whether an SDK or a collector, has to meet the same contract.
| Item | Value |
|---|---|
| Endpoint | https://in.sophonz.ai, OTLP over http/protobuf (/v1/traces, /v1/logs) or gRPC |
| Header | authorization: <API key> |
Resource attribute service.key | The same API key. This is what identifies the tenant |
Resource attribute service.name | The name the service is shown under |
Resource attributes service.namespace, deployment.environment.name | The project the service belongs to, and the environment |
CAUTION — Telemetry without a valid service.key is dropped silently
The collector resolves the tenant from the service.key resource attribute and discards the resource when the key is missing or unknown. The request still answers 200, so the sender reports no error.
The Sophonz SDKs set all of this from apiKey and service. The OpenTelemetry SDKs without a Sophonz wrapper (Java, Go, Rust) take it from OTEL_EXPORTER_OTLP_HEADERS and OTEL_RESOURCE_ATTRIBUTES, as shown in each language's installation page.
Forwarding through your own collector
Where services already export to an OpenTelemetry Collector that you operate, add Sophonz as an exporter. The configuration below uses components from the upstream otelcol-contrib distribution.
receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318
processors:
resource/sophonz:
attributes:
- key: service.key
value: ${env:SOPHONZ_API_KEY}
action: insert
- key: service.namespace
value: my-project
action: insert
- key: deployment.environment.name
value: production
action: insert
batch: {}
exporters:
otlp_http:
endpoint: https://in.sophonz.ai
headers:
authorization: ${env:SOPHONZ_API_KEY}
service:
pipelines:
traces:
receivers: [otlp]
processors: [resource/sophonz, batch]
exporters: [otlp_http]
logs:
receivers: [otlp]
processors: [resource/sophonz, batch]
exporters: [otlp_http]insertkeeps a key the sender already set. Each registered app has its own key, so services that setservice.keythemselves keep it, and the collector fills it in only for senders that cannot attach one. Useupsertto stamp everything passing through with a single key.- There is no metrics pipeline. Adding one produces a failed export on every interval.
otlp_httpappends the signal path. Give it the base URL, not/v1/traces. Collector releases from before the exporter was renamed call itotlphttp.
CAUTION — Log records need a timestamp
The log store keeps a record under its Timestamp field and does not fall back to ObservedTimestamp. A record that carries only the observed time is filed at 1970 and expires immediately. When logs are read from files, parse the time out of each line so the record's own timestamp is set.
Related documentation
- Python configuration — the export options and environment variables an SDK uses for the same contract
- Self-hosted PostgreSQL — the one system here that emits its own spans
- Panels — how services and spans are drawn in Grafana