OTLP
as of v1.11.0The wire format, and the protocol rules that go with it. Worth knowing where those rules live: the OTLP specification is not in the specification repository — specification/protocol/otlp.md is a stub redirecting to the website, and the real document ships in docs/specification.md, beside the .proto files. Both are tracked here.
- messages
- 61
- enums
- 7
- protocol rules
- 119
- breaking changes tracked
- 0
No breaking change to a released wire definition across any tracked release. Every removal and renumbering below happened inside a v1development package, where the project has made no compatibility promise.
Server obligations
The MUSTs that name the server. If you operate an OTLP endpoint, this is the list you are judged against.
- MUSTBad Data
If the processing of the request fails because the request contains data that cannot be decoded or is otherwise invalid and such failure is permanent, then the server MUST respond with
HTTP 400 Bad Request. The client and the server MUST set "Content-Type: application/x-protobuf" request and response headers when sending binary Protobuf encoded payload.
- MUSTFailures
If the processing of the request fails, the server MUST respond with appropriate
HTTP 4xxorHTTP 5xxstatus code. - MUSTFull Success
On success, the server response MUST be a Export\<signal>ServiceResponse message (
ExportTraceServiceResponsefor traces,ExportMetricsServiceResponsefor metrics,ExportLogsServiceResponsefor logs andExportProfilesServiceResponsefor profiles). - MUSTFull Success
The server MUST leave the
partial_successfield unset in case of a successful response. - MUSTFull Success
On success, the server MUST respond with
HTTP 200 OK. - MUSTFull Success
The server MUST leave the
partial_successfield unset in case of a successful response. The client and the server MUST set "Content-Type: application/json" request and response headers when sending JSON Protobuf encoded payload.
The server MUST enforce a message size limit when receiving the request, including after decompression, to mitigate possible excessive memory usage caused by a misconfigured or malicious client sending an oversized request.
If the limit is exceeded, the gRPC server implementations MUST report a
RESOURCE_EXHAUSTEDcode as a non-retryable error.The client MUST enforce a message size limit when receiving the response, including after decompression, to mitigate possible excessive memory usage caused by a misconfigured or malicious server. gRPC client implementations typically enforce a default incoming message size limit of 4 MiB, which is acceptable to use.
The server MUST limit the size of the response message, including before compression, to avoid overwhelming the client.
If the response still cannot fit within the limit, the server MUST fail the request with the
RESOURCE_EXHAUSTEDcode as a non-retryable error.The client MUST then throttle itself to avoid overwhelming the server.
The server MUST limit the size of the request body when parsing it, including after decompression, to mitigate possible excessive memory usage caused by a misconfigured or malicious client sending an oversized request.
If the limit is exceeded, the server MUST respond with
HTTP 413 Content Too Large.The client MUST limit the size of the response body when parsing it, including after decompression, to mitigate possible excessive memory usage caused by a misconfigured or malicious server.
The server MUST limit the size of the response body, including before compression, to avoid overwhelming the client.
If the response still cannot fit within the limit, the server MUST fail the request with
HTTP 500 Internal Server Error.The server MUST set "Content-Type: application/x-protobuf" header if the response body is binary-encoded Protobuf payload.
The server MUST set "Content-Type: application/json" if the response is JSON-encoded Protobuf payload.
The server MUST use the same "Content-Type" in the response as it received in the request.
- MUSTPartial Success
If the request is only partially accepted (i.e. when the server accepts only parts of the data and rejects the rest), the server response MUST be the same Export\<signal>ServiceResponse message as in the Full Success case.
- MUSTPartial Success
Additionally, the server MUST initialize the
partialsuccessfield (ExportTracePartialSuccessmessage for traces,ExportMetricsPartialSuccessmessage for metrics,ExportLogsPartialSuccessmessage for logs andExportProfilesPartialSuccessfor profiles), and it MUST set the respectiverejectedspans,rejecteddatapoints,rejectedlogrecordsorrejected_profilesfield with the number of spans/data points/log records/profiles it rejected. - MUSTPartial Success
If the request is only partially accepted (i.e. when the server accepts only parts of the data and rejects the rest), the server MUST respond with
HTTP 200 OK. - MUSTPartial Success
Additionally, the server MUST initialize the
partialsuccessfield (ExportTracePartialSuccessmessage for traces,ExportMetricsPartialSuccessmessage for metrics,ExportLogsPartialSuccessmessage for logs andExportProfilesPartialSuccessfor profiles), and it MUST set the respectiverejectedspans,rejecteddatapoints,rejectedlogrecordsorrejected_profilesfield with the number of spans/data points/log records it rejected. - MUSTProtocol Details
All server components MUST support the following transport compression options:
Wire definitions
collector/logs/v1/logs_service
- v1.ExportLogsPartialSuccess1 rejected_log_records 2 error_message
- v1.ExportLogsServiceRequest1 resource_logs
- v1.ExportLogsServiceResponse1 partial_success
- v1.LogsServiceno fields
collector/metrics/v1/metrics_service
- v1.ExportMetricsPartialSuccess1 rejected_data_points 2 error_message
- v1.ExportMetricsServiceRequest1 resource_metrics
- v1.ExportMetricsServiceResponse1 partial_success
- v1.MetricsServiceno fields
collector/profiles/v1development/profiles_servicedevelopment
- v1development.ExportProfilesPartialSuccess1 rejected_profiles 2 error_message
- v1development.ExportProfilesServiceRequest1 resource_profiles 2 dictionary
- v1development.ExportProfilesServiceResponse1 partial_success
- v1development.ProfilesServiceno fields
collector/trace/v1/trace_service
- v1.ExportTracePartialSuccess1 rejected_spans 2 error_message
- v1.ExportTraceServiceRequest1 resource_spans
- v1.ExportTraceServiceResponse1 partial_success
- v1.TraceServiceno fields
common/v1/common
- v1.AnyValue1 string_value 2 bool_value 3 int_value 4 double_value 5 array_value 6 kvlist_value 7 bytes_value 8 string_value_strindex
- v1.ArrayValue1 values
- v1.EntityRef1 schema_url 2 type 3 id_keys 4 description_keys
- v1.InstrumentationScope1 name 2 version 3 attributes 4 dropped_attributes_count
- v1.KeyValue1 key 2 value 3 key_strindex
- v1.KeyValueList1 values
logs/v1/logs
- v1.LogRecord1 time_unix_nano 11 observed_time_unix_nano 2 severity_number 3 severity_text 5 body 6 attributes 7 dropped_attributes_count 8 flags 9 trace_id 10 span_id 12 event_name
- v1.LogRecordFlagsLOG_RECORD_FLAGS_DO_NOT_USE=0 LOG_RECORD_FLAGS_TRACE_FLAGS_MASK=0
- v1.LogsData1 resource_logs
- v1.ResourceLogs1 resource 2 scope_logs 3 schema_url
- v1.ScopeLogs1 scope 2 log_records 3 schema_url
- v1.SeverityNumberSEVERITY_NUMBER_UNSPECIFIED=0 SEVERITY_NUMBER_TRACE=1 SEVERITY_NUMBER_TRACE2=2 SEVERITY_NUMBER_TRACE3=3 SEVERITY_NUMBER_TRACE4=4 SEVERITY_NUMBER_DEBUG=5 SEVERITY_NUMBER_DEBUG2=6 SEVERITY_NUMBER_DEBUG3=7 SEVERITY_NUMBER_DEBUG4=8 SEVERITY_NUMBER_INFO=9 SEVERITY_NUMBER_INFO2=10 SEVERITY_NUMBER_INFO3=11 SEVERITY_NUMBER_INFO4=12 SEVERITY_NUMBER_WARN=13 SEVERITY_NUMBER_WARN2=14 SEVERITY_NUMBER_WARN3=15 SEVERITY_NUMBER_WARN4=16 SEVERITY_NUMBER_ERROR=17 SEVERITY_NUMBER_ERROR2=18 SEVERITY_NUMBER_ERROR3=19 SEVERITY_NUMBER_ERROR4=20 SEVERITY_NUMBER_FATAL=21 SEVERITY_NUMBER_FATAL2=22 SEVERITY_NUMBER_FATAL3=23 SEVERITY_NUMBER_FATAL4=24
metrics/v1/metrics
- v1.AggregationTemporalityAGGREGATION_TEMPORALITY_UNSPECIFIED=0 AGGREGATION_TEMPORALITY_DELTA=1 AGGREGATION_TEMPORALITY_CUMULATIVE=2
- v1.DataPointFlagsDATA_POINT_FLAGS_DO_NOT_USE=0 DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK=1
- v1.Exemplar7 filtered_attributes 2 time_unix_nano 3 as_double 6 as_int 4 span_id 5 trace_id
- v1.ExponentialHistogram1 data_points 2 aggregation_temporality
- v1.ExponentialHistogramDataPoint1 attributes 2 start_time_unix_nano 3 time_unix_nano 4 count 5 sum 6 scale 7 zero_count 8 positive 9 negative 10 flags 11 exemplars 12 min 13 max 14 zero_threshold
- ExponentialHistogramDataPoint.Buckets1 offset 2 bucket_counts
- v1.Gauge1 data_points
- v1.Histogram1 data_points 2 aggregation_temporality
- v1.HistogramDataPoint9 attributes 2 start_time_unix_nano 3 time_unix_nano 4 count 5 sum 6 bucket_counts 7 explicit_bounds 8 exemplars 10 flags 11 min 12 max
- v1.Metric1 name 2 description 3 unit 5 gauge 7 sum 9 histogram 10 exponential_histogram 11 summary 12 metadata
- v1.MetricsData1 resource_metrics
- v1.NumberDataPoint7 attributes 2 start_time_unix_nano 3 time_unix_nano 4 as_double 6 as_int 5 exemplars 8 flags
- v1.ResourceMetrics1 resource 2 scope_metrics 3 schema_url
- v1.ScopeMetrics1 scope 2 metrics 3 schema_url
- v1.Sum1 data_points 2 aggregation_temporality 3 is_monotonic
- v1.Summary1 data_points
- v1.SummaryDataPoint7 attributes 2 start_time_unix_nano 3 time_unix_nano 4 count 5 sum 6 quantile_values 8 flags
- SummaryDataPoint.ValueAtQuantile1 quantile 2 value
processcontext/v1development/process_contextdevelopment
- v1development.ProcessContext1 resource 2 attributes
profiles/v1development/profilesdevelopment
- v1development.Function1 name_strindex 2 system_name_strindex 3 filename_strindex 4 start_line
- v1development.KeyValueAndUnit1 key_strindex 2 value 3 unit_strindex
- v1development.Line1 function_index 2 line 3 column
- v1development.Link1 trace_id 2 span_id
- v1development.Location1 mapping_index 2 address 3 lines 4 attribute_indices
- v1development.Mapping1 memory_start 2 memory_limit 3 file_offset 4 filename_strindex 5 attribute_indices
- v1development.Profile1 sample_type 2 samples 3 time_unix_nano 4 duration_nano 5 period_type 6 period 7 profile_id 8 dropped_attributes_count 9 original_payload_format 10 original_payload 11 attribute_indices
- v1development.ProfilesData1 resource_profiles 2 dictionary
- v1development.ProfilesDictionary1 mapping_table 2 location_table 3 function_table 4 link_table 5 string_table 6 attribute_table 7 stack_table
- v1development.ResourceProfiles1 resource 2 scope_profiles 3 schema_url
- v1development.Sample1 stack_index 2 attribute_indices 3 link_index 4 values 5 timestamps_unix_nano
- v1development.ScopeProfiles1 scope 2 profiles 3 schema_url
- v1development.Stack1 location_indices
- v1development.ValueType1 type_strindex 2 unit_strindex
resource/v1/resource
- v1.Resource1 attributes 2 dropped_attributes_count 3 entity_refs
trace/v1/trace
- v1.ResourceSpans1 resource 2 scope_spans 3 schema_url
- v1.ScopeSpans1 scope 2 spans 3 schema_url
- v1.Span1 trace_id 2 span_id 3 trace_state 4 parent_span_id 16 flags 5 name 6 kind 7 start_time_unix_nano 8 end_time_unix_nano 9 attributes 10 dropped_attributes_count 11 events 12 dropped_events_count 13 links 14 dropped_links_count 15 status
- Span.Event1 time_unix_nano 2 name 3 attributes 4 dropped_attributes_count
- Span.Link1 trace_id 2 span_id 3 trace_state 4 attributes 5 dropped_attributes_count 6 flags
- Span.SpanKindSPAN_KIND_UNSPECIFIED=0 SPAN_KIND_INTERNAL=1 SPAN_KIND_SERVER=2 SPAN_KIND_CLIENT=3 SPAN_KIND_PRODUCER=4 SPAN_KIND_CONSUMER=5
- v1.SpanFlagsSPAN_FLAGS_DO_NOT_USE=0 SPAN_FLAGS_TRACE_FLAGS_MASK=0 SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK=0 SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK=0
- v1.Status2 message 3 code
- Status.StatusCodeSTATUS_CODE_UNSET=0 STATUS_CODE_OK=1 STATUS_CODE_ERROR=2
- v1.TracesData1 resource_spans
Both OTLP encodings are load-bearing, which is why almost any change to an existing field counts as breaking here: the binary format keys on the field number, and OTLP/JSON keys on the field name. Renaming a field breaks every JSON client even though the binary wire format never notices. Full definitions in JSON.