Skip to content

Commit 27a10cd

Browse files
authored
Add proto messages for signals data independent of OTLP protocol (#332)
The main motivation for this is to ensure that other protocols can use it to send/receive OTLP data, as well as for persistent storages such as kafka, disk, etc. Signed-off-by: Bogdan Drutu <[email protected]>
1 parent 74e38fb commit 27a10cd

File tree

3 files changed

+57
-0
lines changed

3 files changed

+57
-0
lines changed

opentelemetry/proto/logs/v1/logs.proto

+19
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,25 @@ option java_package = "io.opentelemetry.proto.logs.v1";
2424
option java_outer_classname = "LogsProto";
2525
option go_package = "github.com/open-telemetry/opentelemetry-proto/gen/go/logs/v1";
2626

27+
// LogsData represents the logs data that can be stored in a persistent storage,
28+
// OR can be embedded by other protocols that transfer OTLP logs data but do not
29+
// implement the OTLP protocol.
30+
//
31+
// The main difference between this message and collector protocol is that
32+
// in this message there will not be any "control" or "metadata" specific to
33+
// OTLP protocol.
34+
//
35+
// When new fields are added into this message, the OTLP request MUST be updated
36+
// as well.
37+
message LogsData {
38+
// An array of ResourceLogs.
39+
// For data coming from a single resource this array will typically contain
40+
// one element. Intermediary nodes that receive data from multiple origins
41+
// typically batch the data before forwarding further and in that case this
42+
// array will contain multiple elements.
43+
repeated ResourceLogs resource_logs = 1;
44+
}
45+
2746
// A collection of InstrumentationLibraryLogs from a Resource.
2847
message ResourceLogs {
2948
// The resource for the logs in this message.

opentelemetry/proto/metrics/v1/metrics.proto

+19
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,25 @@ option java_package = "io.opentelemetry.proto.metrics.v1";
2424
option java_outer_classname = "MetricsProto";
2525
option go_package = "github.com/open-telemetry/opentelemetry-proto/gen/go/metrics/v1";
2626

27+
// MetricsData represents the metrics data that can be stored in a persistent
28+
// storage, OR can be embedded by other protocols that transfer OTLP metrics
29+
// data but do not implement the OTLP protocol.
30+
//
31+
// The main difference between this message and collector protocol is that
32+
// in this message there will not be any "control" or "metadata" specific to
33+
// OTLP protocol.
34+
//
35+
// When new fields are added into this message, the OTLP request MUST be updated
36+
// as well.
37+
message MetricsData {
38+
// An array of ResourceMetrics.
39+
// For data coming from a single resource this array will typically contain
40+
// one element. Intermediary nodes that receive data from multiple origins
41+
// typically batch the data before forwarding further and in that case this
42+
// array will contain multiple elements.
43+
repeated ResourceMetrics resource_metrics = 1;
44+
}
45+
2746
// A collection of InstrumentationLibraryMetrics from a Resource.
2847
message ResourceMetrics {
2948
// The resource for the metrics in this message.

opentelemetry/proto/trace/v1/trace.proto

+19
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,25 @@ option java_package = "io.opentelemetry.proto.trace.v1";
2424
option java_outer_classname = "TraceProto";
2525
option go_package = "github.com/open-telemetry/opentelemetry-proto/gen/go/trace/v1";
2626

27+
// TracesData represents the traces data that can be stored in a persistent storage,
28+
// OR can be embedded by other protocols that transfer OTLP traces data but do
29+
// not implement the OTLP protocol.
30+
//
31+
// The main difference between this message and collector protocol is that
32+
// in this message there will not be any "control" or "metadata" specific to
33+
// OTLP protocol.
34+
//
35+
// When new fields are added into this message, the OTLP request MUST be updated
36+
// as well.
37+
message TracesData {
38+
// An array of ResourceSpans.
39+
// For data coming from a single resource this array will typically contain
40+
// one element. Intermediary nodes that receive data from multiple origins
41+
// typically batch the data before forwarding further and in that case this
42+
// array will contain multiple elements.
43+
repeated ResourceSpans resource_spans = 1;
44+
}
45+
2746
// A collection of InstrumentationLibrarySpans from a Resource.
2847
message ResourceSpans {
2948
// The resource for the spans in this message.

0 commit comments

Comments
 (0)