Skip to content

Commit e45993e

Browse files
committed
refactor(otelgin): mark Filter and MetricAttributeFn types and functions as deprecated
1 parent 6dbf2a0 commit e45993e

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
4444
- Improve performance by reducing allocations in the gRPC stats handler in `go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc`. (#7186)
4545
- Update `http.route` attribute to support `request.Pattern` in `go.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmux`. (#7108)
4646
- Change the default span name to be `GET /path` so it complies with the HTTP semantic conventions in `go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin`. (#6381)
47+
- In `go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin`, mark the `Filter` and `MetricAttributeFn` types as well as the `WithFilter` and `WithMetricAttributeFn` functions as deprecated.
4748

4849
### Fixed
4950

instrumentation/github.com/gin-gonic/gin/otelgin/config.go

+1
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ type SpanNameFormatter func(*gin.Context) string
6666

6767
// MetricAttributeFn is used to extract additional attributes from the http.Request
6868
// and return them as a slice of attribute.KeyValue.
69+
// Deprecated: use GinMetricAttributeFn instead.
6970
// v0.61.0 is the last version to support this type.
7071
// v0.62.0 will remove this type.
7172
type MetricAttributeFn func(*http.Request) []attribute.KeyValue

0 commit comments

Comments
 (0)