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

[vcs] add vcs.change.time_to_merge metric #1685

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

adrielp
Copy link
Contributor

@adrielp adrielp commented Dec 14, 2024

Changes

Adds the vcs.change.time_to_merge metric from the GitHub Receiver. It didn't make as part of a previous pull request.

Merge requirement checklist

@adrielp adrielp requested review from a team as code owners December 14, 2024 23:53
Copy link
Contributor

Choose a reason for hiding this comment

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

The vcs.change.time_to_merge metric was removed in the previous PR following this discussion: #1383 (comment)
I thought that vcs.change.state attribute on the vcs.change.duration metric was sufficient to distinguish them, but it makes sense to have time_to_merge separate.

model/vcs/metrics.yaml Show resolved Hide resolved
model/vcs/metrics.yaml Show resolved Hide resolved
- ref: vcs.ref.head.name
requirement_level: required
- ref: vcs.ref.head.revision
requirement_level: recommended

Choose a reason for hiding this comment

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

Should the revision attributes be opt-in instead of recommended due to the cardinality issue?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't have a strong opinion in either direction. Cardinality is a storage concern, but I'm less sure it's a semantic one. recommended and opt-in both provide users the choice in the event cardinality is a concern for them.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's fine for the revision attributes to be recommended for the vcs.change.time_to_merge metric because they are not expected to change after the PR is merged.

However I would make the revision attributes opt-in for the time_to_approval metric because there they could still change if the PR receives additional commits.

Copy link

github-actions bot commented Jan 3, 2025

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions github-actions bot added the Stale label Jan 3, 2025
Copy link
Contributor

Choose a reason for hiding this comment

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

This file is missing a section for the new vcs.change.time_to_merge metric.

Ie the following needs to be added:

### Metric: `vcs.change.time_to_merge`

This metric is [recommended][MetricRecommended].

<!-- semconv metric.vcs.change.time_to_merge -->
<!-- endsemconv -->

Running make fix afterwards will fill in the tables in the generated block.

- ref: vcs.ref.head.name
requirement_level: required
- ref: vcs.ref.head.revision
requirement_level: recommended
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's fine for the revision attributes to be recommended for the vcs.change.time_to_merge metric because they are not expected to change after the PR is merged.

However I would make the revision attributes opt-in for the time_to_approval metric because there they could still change if the PR receives additional commits.

@github-actions github-actions bot removed the Stale label Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

2 participants