OpenTelemetry
Accepts OpenTelemetry(OTel) GRPC or HTTPS directly to the Monad API endpoint.
Requirements
There are no Prerequisites to start using the OTel input. Simply create an OTel Input and attach it to a pipeline.
Details
The OTel input is meant to be a flexible endpoint that one can point their implementation to, to have traces, logs, and metrics collected.
Sending data
Sending data to an OTel input requires sending a POST request to the Monad API via GRPC on port 4317, or HTTPS on port 4318, with an API key and a pipeline ID.
The endpoints accept:
- HTTPS JSON (port 4318)
- HTTPS Protobuf (port 4318)
- GRPC (port 4317)
Each OTel object will be converted to its JSON representation and sent to the stream exactly as it is provided, regardless of input method.
Authentication
All requests to the OTel input endpoint require authentication using an organization API key with the pipeline:data:write permission.
API Key Requirements
The API key must meet the following requirements:
- Must be an organization API key (not a personal API key)
- Must have the
pipeline:data:writepermission, which is included by default in the following roles:- Contributor
- System Administrator
- Alternatively, the permission can be added to a custom role
Required Headers
You must include an authentication header:
- Authorization:
ApiKey <API_KEY>
You must also include the pipeline ID, either as an HTTP header or GRPC metadata, depending on method used.
HTTP Header
- Monad-Pipeline-Id:
<your-pipeline-id>
GRPC Metadata
- monad-pipeline-id:
<your-pipeline-id>
For information on how to use envvars to set OTel headers in standards compliant ways, see this OTLP exporter guide
The Content-Type header is required, and is used to determine handling. This should be set by your OTel implementation automatically.
Example OTLP Settings
export OTEL_EXPORTER_OTLP_ENDPOINT=https://app.monad.com:4317
export OTEL_EXPORTER_OTLP_HEADERS="Authorization=ApiKey <yourkey>,Monad-Pipeline-Id=<your-pipeline-id>"
Response Examples
Success Response (200)
The response received depends on the method used to send.
JSON and protobuf will respond with an HTTP 200 with body
{
"code": 0,
"message": "OK"
}
GRPC will respond with a compliant success response.
Error Responses
Below are some common errors. Others may occur depending on differing error conditions.
| Response | Description |
|---|---|
authorization required | No authentication header was provided |
invalid JWT | The provided JWT token is invalid |
failed to get api key | The API key is no longer valid |
access denied: this endpoint requires pipeline:data:write | The API key lacks the required pipeline:data:write permission |
An item of this type does not exist. | The provided pipeline ID does not exist |
pipeline not found or not an OTel input | The pipeline exists but is not configured as an OTel input |