**License: Enterprise** - Requires an Enterprise license.
**Online mode only** - This probe requires an active connection to the SenHub Observability Platform. It is not available in offline mode.
OpenTelemetry Probe#
Introduction#
The OpenTelemetry probe is a SenHub Agent component that receives telemetry data (metrics, traces, logs) from applications instrumented with OpenTelemetry. It supports both HTTP and gRPC protocols for data collection, providing maximum flexibility for integration into different architectures.
Key Features#
- OTLP (OpenTelemetry Protocol) data reception
- HTTP and gRPC protocol support
- Simultaneous collection of metrics, traces, and logs
- Flexible endpoint and authentication configuration
- TLS support for secure communications
- Seamless integration with the SenHub metrics system
Probe Configuration#
Basic Configuration#
Here is a basic configuration example for the OpenTelemetry probe in the SenHub Agent configuration file:
probes:
- name: otel
type: otel
interval: 60 # collection interval in seconds
telemetry_types:
- metrics
- traces
- logsHTTP Collector Configuration#
probes:
- name: otel
type: otel
interval: 60
http:
endpoint: "http://localhost:4318"
timeout: 30 # timeout in seconds
headers:
Content-Type: "application/json"
Authorization: "Bearer <token>"
telemetry_types:
- metrics
- logsgRPC Collector Configuration#
probes:
- name: otel
type: otel
interval: 60
grpc:
endpoint: "localhost:4317"
timeout: 30 # timeout in seconds
insecure: false # use secure TLS connection (true to disable TLS)
telemetry_types:
- metrics
- tracesAdvanced Configuration (HTTP and gRPC in Parallel)#
probes:
- name: otel
type: otel
interval: 60
telemetry_types:
- metrics
- traces
- logs
http:
endpoint: "http://localhost:4318"
timeout: 30
telemetry_types:
- metrics
- logs
grpc:
endpoint: "localhost:4317"
timeout: 30
insecure: false
telemetry_types:
- tracesCollected Metrics#
The OpenTelemetry probe is a passive receiver: it does not emit its own fixed metric set. Instead, it forwards every metric, trace, and log that a client pushes via OTLP. The set of metrics you see in the SenHub back-end depends entirely on how your applications are instrumented.
Probe Operational Metrics#
In addition to pass-through data, the probe emits operational metrics so you can observe its own health:
| Metric | Unit | Description |
|---|---|---|
otel_metrics_received_total | Count | OTLP metric data points received since startup |
otel_traces_received_total | Count | OTLP spans received since startup |
otel_logs_received_total | Count | OTLP log records received since startup |
otel_receiver_up | Lookup | 1 when configured receivers (HTTP/gRPC) are accepting connections, 0 otherwise |
otel_last_datapoint_age_seconds | Seconds | Time since the most recent datapoint was received (useful to detect silent clients) |
Supported OTLP Metric Types#
- Counters — Monotonically increasing values (forwarded as counter)
- Gauges — Point-in-time observations (forwarded as gauge)
- Histograms — Value distributions with buckets (forwarded as histogram)
- UpDown Counters — Counters that can increase and decrease (forwarded as gauge)
Resource attributes (service.name, service.version, host.name, …) are preserved as tags so metrics remain filterable per-service and per-host downstream.
Example Received Metrics#
Name: http.server.request.duration
Type: Histogram
Tags:
- host: web-server-01
- method: GET
- route: /api/users
- status_code: 200Name: system.memory.usage
Type: Gauge
Tags:
- host: app-server-02
- state: usedSecurity#
TLS Configuration#
For gRPC connections, TLS security is enabled by default. You can configure TLS parameters as follows:
probes:
- name: otel
type: otel
grpc:
endpoint: "localhost:4317"
insecure: false # true to disable TLS
ca_file: "/path/to/ca.pem" # optional - custom CA certificate
cert_file: "/path/to/cert.pem" # optional - client certificate
key_file: "/path/to/key.pem" # optional - client private keyAuthentication#
Several authentication methods are supported:
Basic Auth (HTTP)#
probes:
- name: otel
type: otel
http:
endpoint: "http://localhost:4318"
username: "user"
password: "pass"Token Authentication (HTTP & gRPC)#
For HTTP:
probes:
- name: otel
type: otel
http:
endpoint: "http://localhost:4318"
headers:
Authorization: "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."For gRPC:
probes:
- name: otel
type: otel
grpc:
endpoint: "localhost:4317"
token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."Troubleshooting#
Common Issues and Solutions#
Connection refused
- Verify that the OTLP endpoint is correctly configured and active
- Check that the port is open and accessible
- Test the connection with
telnet <host> <port>to verify reachability
Authentication errors
- Verify that the credentials are correct
- Ensure that authentication headers are properly configured
- Check that the token has not expired
TLS errors
- Verify that certificates are valid and not expired
- Ensure the hostname matches the name in the certificate
- Check that CA, cert, and key file paths are correct
No data received
- Verify that telemetry types (metrics, traces, logs) are correctly configured
- Check that the source application is actually sending data
- Increase the logging level for more details
Logging and Diagnostics#
To enable detailed logging for the OpenTelemetry probe, add the following configuration:
logging:
level: debug
probes:
otel: trace # specific log level for the OpenTelemetry probeConfiguration Validation#
Use the following command to validate the probe configuration:
senhub-agent validate --config path/to/config.yamlUsage Examples#
Collecting Metrics from a Web Application#
probes:
- name: otel
type: otel
interval: 30
telemetry_types:
- metrics
http:
endpoint: "http://webapp:4318"
timeout: 15Collecting Traces from a Microservices Architecture#
probes:
- name: otel
type: otel
interval: 60
telemetry_types:
- traces
grpc:
endpoint: "tracing-service:4317"
timeout: 30
insecure: false
token: "${OTEL_AUTH_TOKEN}" # using an environment variableFull Collection for a Production Environment#
probes:
- name: otel
type: otel
interval: 60
telemetry_types:
- metrics
- traces
- logs
http:
endpoint: "https://otel-collector.example.com:4318"
timeout: 30
headers:
Authorization: "Bearer ${OTEL_TOKEN}"
verify_ssl: true
retry:
max_attempts: 3
initial_delay: 5
max_delay: 30
multiplier: 2