Skip to content

[spanmetricsconnector]Change default duration metrics unit from ms to s#42761

Merged
songy23 merged 11 commits into
open-telemetry:mainfrom
Frapschen:fix-42462
Sep 29, 2025
Merged

[spanmetricsconnector]Change default duration metrics unit from ms to s#42761
songy23 merged 11 commits into
open-telemetry:mainfrom
Frapschen:fix-42462

Conversation

@Frapschen
Copy link
Copy Markdown
Contributor

Description

Following OTel conventions, the default histogram unit is changed from ms to s.

This is a breaking change, but with the changelog guide, user can easily and quickly change the unit to their desired unit.

Link to tracking issue

Fixes #42462

Comment thread .chloggen/fix-42462.yaml Outdated
Comment thread connector/spanmetricsconnector/README.md Outdated
Comment thread connector/spanmetricsconnector/factory.go Outdated
@TylerHelmuth
Copy link
Copy Markdown
Member

@Frapschen also please add a warning to the README that this change is coming.

Comment thread .chloggen/fix-42462.yaml Outdated
Comment thread connector/spanmetricsconnector/factory.go Outdated
Comment thread connector/spanmetricsconnector/README.md Outdated
@TylerHelmuth TylerHelmuth dismissed their stale review September 26, 2025 13:57

feedback applied

Frapschen and others added 3 commits September 26, 2025 22:08
Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com>
Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com>
Comment thread connector/spanmetricsconnector/factory.go
@TylerHelmuth TylerHelmuth added the ready to merge Code review completed; ready to merge by maintainers label Sep 29, 2025
@songy23 songy23 merged commit 103b769 into open-telemetry:main Sep 29, 2025
202 checks passed
@github-actions github-actions Bot added this to the next release milestone Sep 29, 2025
@Frapschen Frapschen deleted the fix-42462 branch September 29, 2025 23:02
codeboten pushed a commit that referenced this pull request May 15, 2026
#### Description
- Migrate programatically registered feature gates to `metadata.yaml`.
Kept comments/TODO intact as I assumed they were committed for a reason
in the first place.
- `from_version` for each gate was determined via `git describe
--contains <commit>` on the commit that introduced it:
  - `connector.spanmetrics.legacyMetricNames` → `v0.109.0` (#34485)
- `connector.spanmetrics.includeCollectorInstanceID` → `v0.136.0`
(#41865)
- `connector.spanmetrics.useSecondAsDefaultMetricsUnit` → `v0.137.0`
(#42761)
  - `connector.spanmetrics.excludeResourceMetrics` → `v0.137.0` (#42760)
- `spanmetrics.statusCodeConvention.useOtelPrefix` → `v0.141.0` (#43000)
- `spanmetrics.statusCodeConvention.useOtelPrefix` had no
`reference_url` in the original registration, so I used the implementing
PR as the reference URL as the issue was only partially fixed.
- `connector_test.go` already imports `google.golang.org/grpc/metadata`,
so the internal `metadata` package was imported with the alias
`spanmetricsmetadata` to avoid a name conflict

#### Link to tracking issue
Part of #46116

#### Testing
- `make` in the component directory
- `make gogci` in root dir

#### Documentation
- `connector/spanmetricsconnector/documentation.md` was generated via
`make generate`
ben-trans pushed a commit to ben-trans/opentelemetry-collector-contrib that referenced this pull request May 25, 2026
…ry#48281)

#### Description
- Migrate programatically registered feature gates to `metadata.yaml`.
Kept comments/TODO intact as I assumed they were committed for a reason
in the first place.
- `from_version` for each gate was determined via `git describe
--contains <commit>` on the commit that introduced it:
  - `connector.spanmetrics.legacyMetricNames` → `v0.109.0` (open-telemetry#34485)
- `connector.spanmetrics.includeCollectorInstanceID` → `v0.136.0`
(open-telemetry#41865)
- `connector.spanmetrics.useSecondAsDefaultMetricsUnit` → `v0.137.0`
(open-telemetry#42761)
  - `connector.spanmetrics.excludeResourceMetrics` → `v0.137.0` (open-telemetry#42760)
- `spanmetrics.statusCodeConvention.useOtelPrefix` → `v0.141.0` (open-telemetry#43000)
- `spanmetrics.statusCodeConvention.useOtelPrefix` had no
`reference_url` in the original registration, so I used the implementing
PR as the reference URL as the issue was only partially fixed.
- `connector_test.go` already imports `google.golang.org/grpc/metadata`,
so the internal `metadata` package was imported with the alias
`spanmetricsmetadata` to avoid a name conflict

#### Link to tracking issue
Part of open-telemetry#46116

#### Testing
- `make` in the component directory
- `make gogci` in root dir

#### Documentation
- `connector/spanmetricsconnector/documentation.md` was generated via
`make generate`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

connector/spanmetrics ready to merge Code review completed; ready to merge by maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[spanmetricsconnector] spanmetricsconnector defaults to ms, while OTel semantic conventions define seconds as the standard unit.

6 participants