-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add processed/exported Span metrics. #184
Changes from 1 commit
60eee99
f65095c
8679683
3ce6cd1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# OTel Components semantic conventions | ||
|
||
**Status**: [Experimental][DocumentStatus] | ||
|
||
This document defines semantic conventions for OTel components (such as processors, exporters, etc). | ||
|
||
OTel Component semantic conventions are defined for the following metrics: | ||
|
||
* [Export](export-metrics.md): For export level metrics. | ||
|
||
[DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/blob/v1.22.0/specification/document-status.md |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<!--- Hugo front matter used to generate the website version of this page: | ||
linkTitle: OTel Export | ||
---> | ||
|
||
# Semantic Conventions for OTel Export Metrics | ||
|
||
**Status**: [Experimental][DocumentStatus] | ||
|
||
This document describes instruments and attributes for OTel | ||
Export level metrics. Consider the [general metric semantic | ||
conventions](README.md#general-metric-semantic-conventions) when creating | ||
instruments not explicitly defined in the specification. | ||
|
||
<!-- Re-generate TOC with `markdown-toc --no-first-h1 -i` --> | ||
|
||
<!-- toc --> | ||
|
||
- [Metric Instruments](#metric-instruments) | ||
* [Metric: `otel.processor.spans`](#metric-otelprocessorspans) | ||
* [Metric: `otel.exporter.spans`](#metric-otelexporterspans) | ||
|
||
<!-- tocstop --> | ||
|
||
## Metric Instruments | ||
|
||
### Metric: `otel.processor.spans` | ||
|
||
This metric is [required][MetricRequired]. | ||
|
||
<!-- semconv metric.otel.processor.spans(metric_table) --> | ||
| Name | Instrument Type | Unit (UCUM) | Description | | ||
| -------- | --------------- | ----------- | -------------- | | ||
| `otel.processor.spans` | Counter | `{span}` | Measures the number of processed Spans. | | ||
<!-- endsemconv --> | ||
|
||
<!-- semconv metric.otel.processor.spans(full) --> | ||
| Attribute | Type | Description | Examples | Requirement Level | | ||
|---|---|---|---|---| | ||
| `processor.dropped` | boolean | Whether the Span was dropped or not. [1] | | Required | | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This does not included un-sampled spans, right? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Right, this doesn't include un-sampled Spans. Will clarify that in a comment. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this missing the |
||
| `processor.type` | string | Type of processor being used. | `BatchSpanProcessor` | Recommended | | ||
|
||
**[1]:** Spans may be dropped if the internal buffer is full. | ||
<!-- endsemconv --> | ||
|
||
### Metric: `otel.exporter.spans` | ||
|
||
This metric is [required][MetricRequired]. | ||
|
||
<!-- semconv metric.otel.exporter.spans(metric_table) --> | ||
| Name | Instrument Type | Unit (UCUM) | Description | | ||
| -------- | --------------- | ----------- | -------------- | | ||
| `otel.exporter.spans` | Counter | `{span}` | Measures the number of exported Spans. | | ||
<!-- endsemconv --> | ||
|
||
<!-- semconv metric.otel.exporter.spans(full) --> | ||
| Attribute | Type | Description | Examples | Requirement Level | | ||
|---|---|---|---|---| | ||
| `exporter.dropped` | boolean | Whether the Span was dropped or not. [1] | | Required | | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There are 3 states from the exporter's view:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, good one, yes. So I guess my initial approached took for granted this:
Think it would make sense to have 3 values instead of two here (as suggested by your comment)? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (On a related note: I will follow up this PR, once it's merged, but some additional metrics, such as retries count at the export level, etc) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm trying to understand how to use this counter and what "dropped' actually means. Does dropped mean you never tried to export, or that you did try and gave up? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh yes. It means that either the spans were dropped for an irrecoverable error (e.g. 4xx), or the max retries count has been reached. You are looking into this clarification or are thinking about some other scenarios as well? (Clarify this as well in this PR in a bit) |
||
| `exporter.type` | string | Type of exporter being used. | `OtlpGrpcSpanExporter` | Recommended | | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this essentially the same as the instrumentation scope name? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would different instances of the same "exporter" get a different type, or the same type? E.g. if I have two OTLP grpc span exporters, would I be able to tell how many spans each was exporting? In the collector today, I believe we can tell the difference between two instances of the same component. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same type ;) I don't think we have a (clear) notion regarding differentiating two processors/exporters of the same type (at least in the SDK). |
||
|
||
**[1]:** Spans may be dropped in case of failed ingestion, e.g. network problem or the exported endpoint being down. | ||
<!-- endsemconv --> | ||
|
||
[MetricRequired]: https://github.com/open-telemetry/opentelemetry-specification/blob/v1.22.0/specification/metrics/metric-requirement-level.md#required |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
groups: | ||
- id: metric.otel.exporter.spans | ||
type: metric | ||
metric_name: otel.exporter.spans | ||
brief: "Measures the number of exported Spans." | ||
instrument: counter | ||
unit: "{span}" | ||
attributes: | ||
- id: exporter.dropped | ||
type: boolean | ||
requirement_level: required | ||
brief: "Whether the Span was dropped or not." | ||
note: > | ||
Spans may be dropped in case of failed ingestion, e.g. network problem | ||
or the exported endpoint being down. | ||
- id: exporter.type | ||
type: string | ||
requirement_level: recommended | ||
brief: "Type of exporter being used." | ||
examples: ["OtlpGrpcSpanExporter"] | ||
- id: metric.otel.processor.spans | ||
type: metric | ||
metric_name: otel.processor.spans | ||
brief: "Measures the number of processed Spans." | ||
instrument: counter | ||
unit: "{span}" | ||
attributes: | ||
- id: processor.dropped | ||
type: boolean | ||
requirement_level: required | ||
brief: "Whether the Span was dropped or not." | ||
note: > | ||
Spans may be dropped if the internal buffer is full. | ||
- id: processor.type | ||
type: string | ||
requirement_level: recommended | ||
brief: "Type of processor being used." | ||
examples: ["BatchSpanProcessor"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OTel SDK components?