diff --git a/opentelemetry/proto/collector/metrics/v1/metrics_service.proto b/opentelemetry/proto/collector/metrics/v1/metrics_service.proto index 9f34caad3..08c71323e 100644 --- a/opentelemetry/proto/collector/metrics/v1/metrics_service.proto +++ b/opentelemetry/proto/collector/metrics/v1/metrics_service.proto @@ -34,7 +34,7 @@ service MetricsService { } message ExportMetricsServiceRequest { - // Metric data. An array of ResourceMetrics. + // An array of ResourceMetrics. // For data coming from a single resource this array will typically contain one // element. Intermediary nodes (such as OpenTelemetry Collector) that receive // data from multiple origins typically batch the data before forwarding further and @@ -42,17 +42,26 @@ message ExportMetricsServiceRequest { repeated ResourceMetrics resource_metrics = 1; } -// A collection of metrics from a Resource. +// A collection of LibraryMetrics from a Resource. message ResourceMetrics { // A list of metrics that originate from a resource. - repeated opentelemetry.proto.metrics.v1.Metric metrics = 1; + repeated LibraryMetrics library_metrics = 1; - // The resource for the metrics in this message that do not have an explicit - // Metric.resource field set. If neither this field nor Metric.resource are set then no - // resource info is known. + // The resource for the metrics in this message. + // If this field is not set then no resource info is known. opentelemetry.proto.resource.v1.Resource resource = 2; } +// A collection of Metrics from a LibraryInfo. +message LibraryMetrics { + // A list of metrics that originate from a library. + repeated opentelemetry.proto.metrics.v1.Metric metrics = 1; + + // The library information for the metrics in this message. + // If this field is not set then no library info is known. + opentelemetry.proto.common.v1.LibraryInfo library_info = 2; +} + message ExportMetricsServiceResponse { } diff --git a/opentelemetry/proto/collector/trace/v1/trace_service.proto b/opentelemetry/proto/collector/trace/v1/trace_service.proto index 225bd0253..eb5eed80e 100644 --- a/opentelemetry/proto/collector/trace/v1/trace_service.proto +++ b/opentelemetry/proto/collector/trace/v1/trace_service.proto @@ -37,7 +37,7 @@ service TraceService { } message ExportTraceServiceRequest { - // Span data. An array of ResourceSpans. + // An array of ResourceSpans. // For data coming from a single resource this array will typically contain one // element. Intermediary nodes (such as OpenTelemetry Collector) that receive // data from multiple origins typically batch the data before forwarding further and @@ -45,9 +45,9 @@ message ExportTraceServiceRequest { repeated ResourceSpans resource_spans = 1; } -// A collection of spans from a Resource. +// A collection of LibrarySpans from a Resource. message ResourceSpans { - // A list of Spans that originate from a resource. + // A list of LibrarySpans that originate from a resource. repeated opentelemetry.proto.trace.v1.Span spans = 1; // The resource for the spans in this message. @@ -55,5 +55,15 @@ message ResourceSpans { opentelemetry.proto.resource.v1.Resource resource = 2; } +// A collection of Spans from a LibraryInfo. +message LibrarySpans { + // A list of Spans that originate from a library. + repeated opentelemetry.proto.trace.v1.Span spans = 1; + + // The library information for the metrics in this message. + // If this field is not set then no library info is known. + opentelemetry.proto.common.v1.LibraryInfo library_info = 2; +} + message ExportTraceServiceResponse { } diff --git a/opentelemetry/proto/common/v1/common.proto b/opentelemetry/proto/common/v1/common.proto index b3b185245..6cf5b51e2 100644 --- a/opentelemetry/proto/common/v1/common.proto +++ b/opentelemetry/proto/common/v1/common.proto @@ -53,3 +53,10 @@ message StringKeyValue { string key = 1; string value = 2; } + +// LibraryInfo is a message representing the instrumented library informations such as the fully +// qualified name and version. +message LibraryInfo { + string name = 1; + string version = 2; +}