Skip to content

Commit

Permalink
Add LibraryInfo and plugin into the collector
Browse files Browse the repository at this point in the history
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
  • Loading branch information
bogdandrutu committed Jan 14, 2020
1 parent d8b1344 commit ca47835
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 9 deletions.
21 changes: 15 additions & 6 deletions opentelemetry/proto/collector/metrics/v1/metrics_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,34 @@ 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
// in that case this array will contain multiple elements.
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 {
}
16 changes: 13 additions & 3 deletions opentelemetry/proto/collector/trace/v1/trace_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,33 @@ 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
// in that case this array will contain multiple elements.
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.
// If this field is not set then no resource info is known.
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 {
}
7 changes: 7 additions & 0 deletions opentelemetry/proto/common/v1/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit ca47835

Please sign in to comment.