-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
span connector output readme update #38106
base: main
Are you sure you want to change the base?
Conversation
It's not clear, is this meant to be attached to the example above it? The markdown headers do not make it very clear, and this could use some more descriptive sentences/paragraphs outlining what exactly you're documenting. |
@dehaansa Addressed the concern changes |
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.
I'm not sure that this addition is valuable in its current form. A much more concise addition of example metrics at the end of each example configuration would likely add the value that the raised issue is seeking.
|
||
### Viewing Span Metrics in Prometheus | ||
|
||
The Span Metrics Connector in the OpenTelemetry Collector transforms trace span data into aggregated metrics, following the Request, Error, and Duration (R.E.D) methodology. It outputs key metrics such as request counts (calls), error rates (calls{status_code="5xx"}), and latency distributions (duration histograms). These metrics provide a structured view of service performance, enabling real-time monitoring, alerting, and analysis. |
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.
This reads like an AI-generated summary, and doesn't belong in this section.
|
||
The Span Metrics Connector in the OpenTelemetry Collector transforms trace span data into aggregated metrics, following the Request, Error, and Duration (R.E.D) methodology. It outputs key metrics such as request counts (calls), error rates (calls{status_code="5xx"}), and latency distributions (duration histograms). These metrics provide a structured view of service performance, enabling real-time monitoring, alerting, and analysis. | ||
|
||
You can observe the output from the `spanmetrics` connector in Prometheus by visiting [http://localhost:9090/graph](http://localhost:9090/graph). |
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.
This assumes the configuration being used is exporting to prometheus, and that it's a local prometheus. Should this output metrics section belong to one of the examples above instead of being in its own section?
|
||
### Available Metrics | ||
|
||
When the spanmetrics connector processes traces, it generates several Prometheus-formatted metrics. Each metric provides different insights into your service's behavior and performance. |
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.
The metrics generated are not prometheus-formatted, they are opentelemetry metrics that in your example are exported to a prometheus endpoint using the exporter.
|
||
This counter metric maintains the running sum of all span durations in milliseconds. When combined with the count metric, it allows you to calculate average durations using the formula: `sum/count`. | ||
|
||
#### Label Conventions |
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.
These are already listed at the end of the Overview
section, and also can be disabled using the exclude_dimensions
configuration parameter.
- `status_code`: Shows the operation's result status | ||
- Any additional dimensions configured in your spanmetrics connector | ||
|
||
Note: Label names follow Prometheus naming conventions (lowercase with underscores) rather than OpenTelemetry conventions. |
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.
This is only true in your example that exports to prometheus.
Description
Added output of span metric connector into the readme based on the given example.
Link to tracking issue
Fixes Issue
Testing
Used sample go application to generate the spans. Then below otel config used for get spanmetrics metrics into prometheus.
Documentation
Updated the readme