| 1 |
syntax = "proto3"; |
| 2 |
|
| 3 |
package opentelemetry.collector.pdata.xpdata.internal; |
| 4 |
|
| 5 |
option go_package = "go.opentelemetry.io/collector/pdata/xpdata/internal"; |
| 6 |
|
| 7 |
import "gogoproto/gogo.proto"; |
| 8 |
|
| 9 |
import "opentelemetry/proto/trace/v1/trace.proto"; |
| 10 |
import "opentelemetry/proto/metrics/v1/metrics.proto"; |
| 11 |
import "opentelemetry/proto/logs/v1/logs.proto"; |
| 12 |
import "opentelemetry/proto/common/v1/common.proto"; |
| 13 |
import "opentelemetry/proto/profiles/v1development/profiles.proto"; |
| 14 |
|
| 15 |
// SpanContext represents a span context encoded associated with a telemetry export request. |
| 16 |
message SpanContext { |
| 17 |
bytes trace_id = 1; |
| 18 |
bytes span_id = 2; |
| 19 |
fixed32 trace_flags = 3; |
| 20 |
string trace_state = 4; |
| 21 |
bool remote = 5; |
| 22 |
} |
| 23 |
|
| 24 |
message IPAddr { |
| 25 |
bytes ip = 1; |
| 26 |
string zone = 2; |
| 27 |
} |
| 28 |
|
| 29 |
message TCPAddr { |
| 30 |
bytes ip = 1; |
| 31 |
int64 port = 2; |
| 32 |
string zone = 3; |
| 33 |
} |
| 34 |
|
| 35 |
message UDPAddr { |
| 36 |
bytes ip = 1; |
| 37 |
int64 port = 2; |
| 38 |
string zone = 3; |
| 39 |
} |
| 40 |
|
| 41 |
message UnixAddr { |
| 42 |
string name = 1; |
| 43 |
string net = 2; |
| 44 |
} |
| 45 |
|
| 46 |
// RequestContext represents metadata associated with a telemetry export request. |
| 47 |
message RequestContext { |
| 48 |
SpanContext span_context = 1; |
| 49 |
|
| 50 |
// ClientMetadata contains additional metadata about the client making the request. |
| 51 |
repeated opentelemetry.proto.common.v1.KeyValue client_metadata = 2 [ (gogoproto.nullable) = false ]; |
| 52 |
|
| 53 |
// ClientAddress contains the address of the client making the request. |
| 54 |
oneof client_address { |
| 55 |
IPAddr ip = 3; |
| 56 |
TCPAddr tcp = 4; |
| 57 |
UDPAddr udp = 5; |
| 58 |
UnixAddr unix = 6; |
| 59 |
} |
| 60 |
} |
| 61 |
|
| 62 |
// The following messages are wrappers around standard OpenTelemetry data types. |
| 63 |
// They embed request-level context and a version discriminator to ensure they are not wire-compatible with |
| 64 |
// the canonical OpenTelemetry proto messages. |
| 65 |
// |
| 66 |
// Each wrapper reserves field tag 1 for a `fixed32` (protobuf wire type 5) format_version field, which makes it |
| 67 |
// structurally incompatible with the standard OTLP messages which use tag 1 for the data message field (protobuf wire type 2). |
| 68 |
// This ensures old and new formats cannot be confused during decoding. |
| 69 |
|
| 70 |
message TracesRequest { |
| 71 |
fixed32 format_version = 1; |
| 72 |
RequestContext request_context = 2; |
| 73 |
opentelemetry.proto.trace.v1.TracesData traces_data = 3; |
| 74 |
} |
| 75 |
|
| 76 |
message MetricsRequest { |
| 77 |
fixed32 format_version = 1; |
| 78 |
RequestContext request_context = 2; |
| 79 |
opentelemetry.proto.metrics.v1.MetricsData metrics_data = 3; |
| 80 |
} |
| 81 |
|
| 82 |
message LogsRequest { |
| 83 |
fixed32 format_version = 1; |
| 84 |
RequestContext request_context = 2; |
| 85 |
opentelemetry.proto.logs.v1.LogsData logs_data = 3; |
| 86 |
} |
| 87 |
|
| 88 |
message ProfilesRequest { |
| 89 |
fixed32 format_version = 1; |
| 90 |
RequestContext request_context = 2; |
| 91 |
opentelemetry.proto.profiles.v1development.ProfilesData profiles_data = 3; |
| 92 |
} |