Skip to content
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

[Spanmetrics] Add events_total metric to get the measurement for list of configured event attributes for a span #27811

Merged
merged 19 commits into from
Oct 31, 2023

Conversation

aishyandapalli
Copy link
Contributor

@aishyandapalli aishyandapalli commented Oct 17, 2023

Description:
We have an events section for a span. The details for all the exceptions like exception.type and exception.message are recorded as Events for a span. Right now, we don't have a feature to add event attributes to span metrics.

The idea of this PR is to develop a feature which adds a new metric events_total with a default set of dimensions like service_name, span_name, span_kind, status_code. We can configure to add additional set of dimensions like exception.type and exception.message which will be fetched from the Events section for a span

Link to tracking Issue: 27451

@aishyandapalli
Copy link
Contributor Author

cc @albertteoh

connector/spanmetricsconnector/connector.go Outdated Show resolved Hide resolved
connector/spanmetricsconnector/README.md Outdated Show resolved Hide resolved
connector/spanmetricsconnector/config.go Outdated Show resolved Hide resolved
connector/spanmetricsconnector/config.go Show resolved Hide resolved
connector/spanmetricsconnector/connector.go Show resolved Hide resolved
@aishyandapalli
Copy link
Contributor Author

@albertteoh Added a check for empty dimensions and also added unit tests

connector/spanmetricsconnector/connector.go Outdated Show resolved Hide resolved
connector/spanmetricsconnector/connector_test.go Outdated Show resolved Hide resolved
connector/spanmetricsconnector/config.go Outdated Show resolved Hide resolved
Copy link
Contributor

@albertteoh albertteoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

connector/spanmetricsconnector/config.go Outdated Show resolved Hide resolved
connector/spanmetricsconnector/config.go Outdated Show resolved Hide resolved
@aishyandapalli aishyandapalli force-pushed the span-metrics-for-events branch 3 times, most recently from 3a62dbd to 569304c Compare October 30, 2023 16:54
@djaglowski djaglowski merged commit b3328a7 into open-telemetry:main Oct 31, 2023
83 checks passed
@github-actions github-actions bot added this to the next release milestone Oct 31, 2023
jmsnll pushed a commit to jmsnll/opentelemetry-collector-contrib that referenced this pull request Nov 12, 2023
… of configured event attributes for a span (open-telemetry#27811)

**Description:**
We have an events section for a span. The details for all the exceptions
like exception.type and exception.message are recorded as Events for a
span. Right now, we don't have a feature to add event attributes to span
metrics.

The idea of this PR is to develop a feature which adds a new metric
`events_total` with a default set of dimensions like `service_name,
span_name, span_kind, status_code`. We can configure to add additional
set of dimensions like `exception.type` and `exception.message` which
will be fetched from the Events section for a span

**Link to tracking Issue:**
[27451](open-telemetry#27451)

---------

Co-authored-by: Albert <[email protected]>
RoryCrispin pushed a commit to ClickHouse/opentelemetry-collector-contrib that referenced this pull request Nov 24, 2023
… of configured event attributes for a span (open-telemetry#27811)

**Description:**
We have an events section for a span. The details for all the exceptions
like exception.type and exception.message are recorded as Events for a
span. Right now, we don't have a feature to add event attributes to span
metrics.

The idea of this PR is to develop a feature which adds a new metric
`events_total` with a default set of dimensions like `service_name,
span_name, span_kind, status_code`. We can configure to add additional
set of dimensions like `exception.type` and `exception.message` which
will be fetched from the Events section for a span

**Link to tracking Issue:**
[27451](open-telemetry#27451)

---------

Co-authored-by: Albert <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants