1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2026-06-03 18:35:08 +02:00
Commit Graph

9 Commits

Author SHA1 Message Date
David Ashpole 28df982c8b Add support for experimental options in the metrics API (#8111)
Part of https://github.com/open-telemetry/opentelemetry-go/issues/8110

Related to
https://github.com/open-telemetry/opentelemetry-go/issues/5882.

I'm hoping to find a better way to support experimental Options types in
our API packages. This is one approach to consider.

This contains no public API changes. It introduces a type:
`ExperimentalOption` in `/metric/internal/x`, which can be used by our
experimental options defined outside of the module. Options that embed
this interface are ignored by `New*Config` builder functions in the
metrics API to prevent them from panicing when used. Only SDKs that
explicitly support the experimental option in question will respect it.
Alternative SDKs will ignore the experimental options. We would still
need to treat ExperimentalOption as a stable artifact, since the SDK
will indirectly depend on it.

See
https://github.com/open-telemetry/opentelemetry-go/compare/main...dashpole:opentelemetry-go:attributes_advisory
for how this would be used to support the advisory attributes parameter.
2026-04-03 15:56:57 -04:00
Tyler Yahn 7512a2be2e Add the golines golangci-lint formatter (#6513)
Ensure consistent line wrapping (<= 120 characters) within the project.
2025-03-30 03:46:44 -07:00
Cattī Crūdēlēs 38b9734230 doc(metric): fix incorrect explanation of how metric.WithAttributes works (#5822) 2024-09-16 09:09:28 +02:00
Tyler Yahn dafe137bbe Add the synchronous gauge to the metric API and SDK (#5304)
Resolve #5225 

The specification has [added a synchronous gauge
instrument](https://github.com/open-telemetry/opentelemetry-specification/pull/3540).
That instrument has now been
[stabilized](https://github.com/open-telemetry/opentelemetry-specification/pull/4019),
and that stabilization is included in the [next
release](https://github.com/open-telemetry/opentelemetry-specification/pull/4034).

This adds the new synchronous gauge instrument to the metric API and all
implementation we publish.

This change will be a breaking change for any SDK developer. The
`embedded` package is updated to ensure our compatibility guarantees are
meet.

---------

Co-authored-by: David Ashpole <dashpole@google.com>
2024-05-16 09:56:40 -07:00
Robert Pająk 7dea232a46 [chore] Simplify the license header (#4987) 2024-02-29 07:05:28 +01:00
David Ashpole 0f5565af4f Add WithExplicitBucketBoundaries Histogram option to the metric api (#4603)
* Add WithExplicitBucketBoundaries Histogram option to the metric api

* Add note that the option is advisory

---------

Co-authored-by: Robert Pająk <pellared@hotmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
2023-10-26 12:18:37 -05:00
Robert Pająk b8e8e5eb8b metric: Recommend defining units in UCUM (#4418)
* metric: Recommend defining units in UCUM

* Update metric/instrument.go

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

---------

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2023-08-08 14:16:58 +02:00
Tyler Yahn 6f045478c9 Fix article in metric API docs (#4054) 2023-05-08 15:00:27 -05:00
Tyler Yahn 15d6ba2921 Unify metric API into the one otel/metric package (#4018)
* Move instrument into metric

* Update metric docs to include instrument

* Update package names

* Update all imports of sdk/metric/instrument

* Rename Option to InstrumentOption

* Deprecate otel/metric/instrument

* Add changelog entry
2023-04-27 11:25:48 -07:00