build(deps): bump the otel group with 8 updates
Bumps the otel group with 8 updates: | Package | From | To | | --- | --- | --- | | [go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc](https://github.com/open-telemetry/opentelemetry-go-contrib) | `0.46.1` | `0.48.0` | | [go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp](https://github.com/open-telemetry/opentelemetry-go-contrib) | `0.45.0` | `0.48.0` | | [go.opentelemetry.io/otel](https://github.com/open-telemetry/opentelemetry-go) | `1.21.0` | `1.23.0` | | [go.opentelemetry.io/otel/exporters/otlp/otlptrace](https://github.com/open-telemetry/opentelemetry-go) | `1.19.0` | `1.23.1` | | [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc](https://github.com/open-telemetry/opentelemetry-go) | `1.19.0` | `1.23.1` | | [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp](https://github.com/open-telemetry/opentelemetry-go) | `1.19.0` | `1.23.1` | | [go.opentelemetry.io/otel/sdk](https://github.com/open-telemetry/opentelemetry-go) | `1.21.0` | `1.23.1` | | [go.opentelemetry.io/otel/trace](https://github.com/open-telemetry/opentelemetry-go) | `1.21.0` | `1.23.1` | Updates `go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc` from 0.46.1 to 0.48.0 - [Release notes](https://github.com/open-telemetry/opentelemetry-go-contrib/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-go-contrib/compare/zpages/v0.46.1...zpages/v0.48.0) Updates `go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp` from 0.45.0 to 0.48.0 - [Release notes](https://github.com/open-telemetry/opentelemetry-go-contrib/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-go-contrib/compare/zpages/v0.45.0...zpages/v0.48.0) Updates `go.opentelemetry.io/otel` from 1.21.0 to 1.23.0 - [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.21.0...v1.23.0) Updates `go.opentelemetry.io/otel/exporters/otlp/otlptrace` from 1.19.0 to 1.23.1 - [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.19.0...v1.23.1) Updates `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc` from 1.19.0 to 1.23.1 - [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.19.0...v1.23.1) Updates `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp` from 1.19.0 to 1.23.1 - [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.19.0...v1.23.1) Updates `go.opentelemetry.io/otel/sdk` from 1.21.0 to 1.23.1 - [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.21.0...v1.23.1) Updates `go.opentelemetry.io/otel/trace` from 1.21.0 to 1.23.1 - [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.21.0...v1.23.1) --- updated-dependencies: - dependency-name: go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc dependency-type: direct:production update-type: version-update:semver-minor dependency-group: otel - dependency-name: go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp dependency-type: direct:production update-type: version-update:semver-minor dependency-group: otel - dependency-name: go.opentelemetry.io/otel dependency-type: direct:production update-type: version-update:semver-minor dependency-group: otel - dependency-name: go.opentelemetry.io/otel/exporters/otlp/otlptrace dependency-type: direct:production update-type: version-update:semver-minor dependency-group: otel - dependency-name: go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc dependency-type: direct:production update-type: version-update:semver-minor dependency-group: otel - dependency-name: go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp dependency-type: direct:production update-type: version-update:semver-minor dependency-group: otel - dependency-name: go.opentelemetry.io/otel/sdk dependency-type: direct:production update-type: version-update:semver-minor dependency-group: otel - dependency-name: go.opentelemetry.io/otel/trace dependency-type: direct:production update-type: version-update:semver-minor dependency-group: otel ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
parent
528dcfaab9
commit
5e3e12d2ab
34
go.mod
34
go.mod
@ -57,18 +57,18 @@ require (
|
|||||||
github.com/urfave/cli v1.22.14
|
github.com/urfave/cli v1.22.14
|
||||||
github.com/vishvananda/netlink v1.2.1-beta.2
|
github.com/vishvananda/netlink v1.2.1-beta.2
|
||||||
go.etcd.io/bbolt v1.3.8
|
go.etcd.io/bbolt v1.3.8
|
||||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1
|
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.48.0
|
||||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0
|
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.48.0
|
||||||
go.opentelemetry.io/otel v1.21.0
|
go.opentelemetry.io/otel v1.23.1
|
||||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0
|
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.23.1
|
||||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0
|
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.23.1
|
||||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0
|
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.23.1
|
||||||
go.opentelemetry.io/otel/sdk v1.21.0
|
go.opentelemetry.io/otel/sdk v1.23.1
|
||||||
go.opentelemetry.io/otel/trace v1.21.0
|
go.opentelemetry.io/otel/trace v1.23.1
|
||||||
golang.org/x/mod v0.14.0
|
golang.org/x/mod v0.14.0
|
||||||
golang.org/x/sync v0.6.0
|
golang.org/x/sync v0.6.0
|
||||||
golang.org/x/sys v0.16.0
|
golang.org/x/sys v0.16.0
|
||||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20231212172506-995d672761c0
|
google.golang.org/genproto/googleapis/rpc v0.0.0-20240102182953-50ed04b92917
|
||||||
google.golang.org/grpc v1.61.0
|
google.golang.org/grpc v1.61.0
|
||||||
google.golang.org/protobuf v1.32.0
|
google.golang.org/protobuf v1.32.0
|
||||||
k8s.io/apimachinery v0.28.4
|
k8s.io/apimachinery v0.28.4
|
||||||
@ -89,7 +89,7 @@ require (
|
|||||||
github.com/cilium/ebpf v0.11.0 // indirect
|
github.com/cilium/ebpf v0.11.0 // indirect
|
||||||
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
|
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
|
||||||
github.com/emicklei/go-restful/v3 v3.10.2 // indirect
|
github.com/emicklei/go-restful/v3 v3.10.2 // indirect
|
||||||
github.com/felixge/httpsnoop v1.0.3 // indirect
|
github.com/felixge/httpsnoop v1.0.4 // indirect
|
||||||
github.com/go-logr/logr v1.4.1 // indirect
|
github.com/go-logr/logr v1.4.1 // indirect
|
||||||
github.com/go-logr/stdr v1.2.2 // indirect
|
github.com/go-logr/stdr v1.2.2 // indirect
|
||||||
github.com/godbus/dbus/v5 v5.1.0 // indirect
|
github.com/godbus/dbus/v5 v5.1.0 // indirect
|
||||||
@ -97,7 +97,7 @@ require (
|
|||||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
|
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
|
||||||
github.com/golang/protobuf v1.5.3 // indirect
|
github.com/golang/protobuf v1.5.3 // indirect
|
||||||
github.com/google/gofuzz v1.2.0 // indirect
|
github.com/google/gofuzz v1.2.0 // indirect
|
||||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.2 // indirect
|
github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 // indirect
|
||||||
github.com/hashicorp/errwrap v1.1.0 // indirect
|
github.com/hashicorp/errwrap v1.1.0 // indirect
|
||||||
github.com/json-iterator/go v1.1.12 // indirect
|
github.com/json-iterator/go v1.1.12 // indirect
|
||||||
github.com/klauspost/cpuid/v2 v2.2.5 // indirect
|
github.com/klauspost/cpuid/v2 v2.2.5 // indirect
|
||||||
@ -114,17 +114,17 @@ require (
|
|||||||
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 // indirect
|
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 // indirect
|
||||||
github.com/vishvananda/netns v0.0.4 // indirect
|
github.com/vishvananda/netns v0.0.4 // indirect
|
||||||
go.opencensus.io v0.24.0 // indirect
|
go.opencensus.io v0.24.0 // indirect
|
||||||
go.opentelemetry.io/otel/metric v1.21.0 // indirect
|
go.opentelemetry.io/otel/metric v1.23.1 // indirect
|
||||||
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
|
go.opentelemetry.io/proto/otlp v1.1.0 // indirect
|
||||||
golang.org/x/exp v0.0.0-20231214170342-aacd6d4b4611 // indirect
|
golang.org/x/exp v0.0.0-20231214170342-aacd6d4b4611 // indirect
|
||||||
golang.org/x/net v0.19.0 // indirect
|
golang.org/x/net v0.20.0 // indirect
|
||||||
golang.org/x/oauth2 v0.14.0 // indirect
|
golang.org/x/oauth2 v0.15.0 // indirect
|
||||||
golang.org/x/term v0.15.0 // indirect
|
golang.org/x/term v0.16.0 // indirect
|
||||||
golang.org/x/text v0.14.0 // indirect
|
golang.org/x/text v0.14.0 // indirect
|
||||||
golang.org/x/time v0.3.0 // indirect
|
golang.org/x/time v0.3.0 // indirect
|
||||||
golang.org/x/tools v0.16.0 // indirect
|
golang.org/x/tools v0.16.0 // indirect
|
||||||
google.golang.org/appengine v1.6.8 // indirect
|
google.golang.org/appengine v1.6.8 // indirect
|
||||||
google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 // indirect
|
google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917 // indirect
|
||||||
gopkg.in/inf.v0 v0.9.1 // indirect
|
gopkg.in/inf.v0 v0.9.1 // indirect
|
||||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||||
|
78
go.sum
78
go.sum
@ -96,8 +96,8 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m
|
|||||||
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
||||||
github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA=
|
github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA=
|
||||||
github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE=
|
github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE=
|
||||||
github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk=
|
github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=
|
||||||
github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
|
github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
|
||||||
github.com/frankban/quicktest v1.14.5 h1:dfYrrRyLtiqT9GyKXgdh+k4inNeTvmGbuSgZ3lx3GhA=
|
github.com/frankban/quicktest v1.14.5 h1:dfYrrRyLtiqT9GyKXgdh+k4inNeTvmGbuSgZ3lx3GhA=
|
||||||
github.com/frankban/quicktest v1.14.5/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
|
github.com/frankban/quicktest v1.14.5/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
|
||||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||||
@ -132,8 +132,6 @@ github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7a
|
|||||||
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
|
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
|
||||||
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
|
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
|
||||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
||||||
github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo=
|
|
||||||
github.com/golang/glog v1.1.2/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ=
|
|
||||||
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE=
|
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE=
|
||||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||||
@ -180,8 +178,8 @@ github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDa
|
|||||||
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8=
|
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8=
|
||||||
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho=
|
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho=
|
||||||
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
|
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
|
||||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.2 h1:dygLcbEBA+t/P7ck6a8AkXv6juQ4cK0RHBoh32jxhHM=
|
github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 h1:Wqo399gCIufwto+VfwCSvsnfGpF/w5E9CNxSwbpD6No=
|
||||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.2/go.mod h1:Ap9RLCIJVtgQg1/BBgVEfypOAySvvlcpcVQkSzJCH4Y=
|
github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0/go.mod h1:qmOFXW2epJhM0qSnUUYpldc7gVz2KMQwJ/QYCDIa7XU=
|
||||||
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
||||||
github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I=
|
github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I=
|
||||||
github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
||||||
@ -352,30 +350,30 @@ go.etcd.io/bbolt v1.3.8 h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA=
|
|||||||
go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw=
|
go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw=
|
||||||
go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0=
|
go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0=
|
||||||
go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo=
|
go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo=
|
||||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1 h1:SpGay3w+nEwMpfVnbqOLH5gY52/foP8RE8UzTZ1pdSE=
|
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.48.0 h1:P+/g8GpuJGYbOp2tAdKrIPUX9JO02q8Q0YNlHolpibA=
|
||||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1/go.mod h1:4UoMYEZOC0yN/sPGH76KPkkU7zgiEWYWL9vwmbnTJPE=
|
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.48.0/go.mod h1:tIKj3DbO8N9Y2xo52og3irLsPI4GW02DSMtrVgNMgxg=
|
||||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 h1:x8Z78aZx8cOF0+Kkazoc7lwUNMGy0LrzEMxTm4BbTxg=
|
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.48.0 h1:doUP+ExOpH3spVTLS0FcWGLnQrPct/hD/bCPbDRUEAU=
|
||||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0/go.mod h1:62CPTSry9QZtOaSsE3tOzhx6LzDhHnXJ6xHeMNNiM6Q=
|
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.48.0/go.mod h1:rdENBZMT2OE6Ne/KLwpiXudnAsbdrdBaqBvTN8M8BgA=
|
||||||
go.opentelemetry.io/otel v1.21.0 h1:hzLeKBZEL7Okw2mGzZ0cc4k/A7Fta0uoPgaJCr8fsFc=
|
go.opentelemetry.io/otel v1.23.1 h1:Za4UzOqJYS+MUczKI320AtqZHZb7EqxO00jAHE0jmQY=
|
||||||
go.opentelemetry.io/otel v1.21.0/go.mod h1:QZzNPQPm1zLX4gZK4cMi+71eaorMSGT3A4znnUvNNEo=
|
go.opentelemetry.io/otel v1.23.1/go.mod h1:Td0134eafDLcTS4y+zQ26GE8u3dEuRBiBCTUIRHaikA=
|
||||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 h1:Mne5On7VWdx7omSrSSZvM4Kw7cS7NQkOOmLcgscI51U=
|
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.23.1 h1:o8iWeVFa1BcLtVEV0LzrCxV2/55tB3xLxADr6Kyoey4=
|
||||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0/go.mod h1:IPtUMKL4O3tH5y+iXVyAXqpAwMuzC1IrxVS81rummfE=
|
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.23.1/go.mod h1:SEVfdK4IoBnbT2FXNM/k8yC08MrfbhWk3U4ljM8B3HE=
|
||||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0 h1:3d+S281UTjM+AbF31XSOYn1qXn3BgIdWl8HNEpx08Jk=
|
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.23.1 h1:p3A5+f5l9e/kuEBwLOrnpkIDHQFlHmbiVxMURWRK6gQ=
|
||||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0/go.mod h1:0+KuTDyKL4gjKCF75pHOX4wuzYDUZYfAQdSu43o+Z2I=
|
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.23.1/go.mod h1:OClrnXUjBqQbInvjJFjYSnMxBSCXBF8r3b34WqjiIrQ=
|
||||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0 h1:IeMeyr1aBvBiPVYihXIaeIZba6b8E1bYp7lbdxK8CQg=
|
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.23.1 h1:cfuy3bXmLJS7M1RZmAL6SuhGtKUp2KEsrm00OlAXkq4=
|
||||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0/go.mod h1:oVdCUtjq9MK9BlS7TtucsQwUcXcymNiEDjgDD2jMtZU=
|
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.23.1/go.mod h1:22jr92C6KwlwItJmQzfixzQM3oyyuYLCfHiMY+rpsPU=
|
||||||
go.opentelemetry.io/otel/metric v1.21.0 h1:tlYWfeo+Bocx5kLEloTjbcDwBuELRrIFxwdQ36PlJu4=
|
go.opentelemetry.io/otel/metric v1.23.1 h1:PQJmqJ9u2QaJLBOELl1cxIdPcpbwzbkjfEyelTl2rlo=
|
||||||
go.opentelemetry.io/otel/metric v1.21.0/go.mod h1:o1p3CA8nNHW8j5yuQLdc1eeqEaPfzug24uvsyIEJRWM=
|
go.opentelemetry.io/otel/metric v1.23.1/go.mod h1:mpG2QPlAfnK8yNhNJAxDZruU9Y1/HubbC+KyH8FaCWI=
|
||||||
go.opentelemetry.io/otel/sdk v1.21.0 h1:FTt8qirL1EysG6sTQRZ5TokkU8d0ugCj8htOgThZXQ8=
|
go.opentelemetry.io/otel/sdk v1.23.1 h1:O7JmZw0h76if63LQdsBMKQDWNb5oEcOThG9IrxscV+E=
|
||||||
go.opentelemetry.io/otel/sdk v1.21.0/go.mod h1:Nna6Yv7PWTdgJHVRD9hIYywQBRx7pbox6nwBnZIxl/E=
|
go.opentelemetry.io/otel/sdk v1.23.1/go.mod h1:LzdEVR5am1uKOOwfBWFef2DCi1nu3SA8XQxx2IerWFk=
|
||||||
go.opentelemetry.io/otel/trace v1.21.0 h1:WD9i5gzvoUPuXIXH24ZNBudiarZDKuekPqi/E8fpfLc=
|
go.opentelemetry.io/otel/trace v1.23.1 h1:4LrmmEd8AU2rFvU1zegmvqW7+kWarxtNOPyeL6HmYY8=
|
||||||
go.opentelemetry.io/otel/trace v1.21.0/go.mod h1:LGbsEB0f9LGjN+OZaQQ26sohbOmiMR+BaslueVtS/qQ=
|
go.opentelemetry.io/otel/trace v1.23.1/go.mod h1:4IpnpJFwr1mo/6HL8XIPJaE9y0+u1KcVmuW7dwFSVrI=
|
||||||
go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I=
|
go.opentelemetry.io/proto/otlp v1.1.0 h1:2Di21piLrCqJ3U3eXGCTPHE9R8Nh+0uglSnOyxikMeI=
|
||||||
go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM=
|
go.opentelemetry.io/proto/otlp v1.1.0/go.mod h1:GpBHCBWiqvVLDqmHZsoMM3C5ySeKTC7ej/RNTae6MdY=
|
||||||
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
|
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
|
||||||
go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A=
|
go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A=
|
||||||
go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A=
|
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
||||||
go.uber.org/goleak v1.2.1/go.mod h1:qlT2yGI9QafXHhZZLxlSuNsMw3FFLxBr+tBRlmO1xH4=
|
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
|
||||||
go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
|
go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
|
||||||
go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI=
|
go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI=
|
||||||
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||||
@ -411,11 +409,11 @@ golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwY
|
|||||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||||
golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk=
|
golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk=
|
||||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||||
golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c=
|
golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo=
|
||||||
golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U=
|
golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY=
|
||||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||||
golang.org/x/oauth2 v0.14.0 h1:P0Vrf/2538nmC0H+pEQ3MNFRRnVR7RlqyVw+bvm26z0=
|
golang.org/x/oauth2 v0.15.0 h1:s8pnnxNVzjWyrvYdFUQq5llS1PX2zhPXmccZv99h7uQ=
|
||||||
golang.org/x/oauth2 v0.14.0/go.mod h1:lAtNWgaWfL4cm7j2OV8TxGi9Qb7ECORx8DktCY74OwM=
|
golang.org/x/oauth2 v0.15.0/go.mod h1:q48ptWNTY5XWf+JNten23lcvHpLJ0ZSxF5ttTHKVCAM=
|
||||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
@ -457,8 +455,8 @@ golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU=
|
|||||||
golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||||
golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4=
|
golang.org/x/term v0.16.0 h1:m+B6fahuftsE9qjo0VWp2FW0mB3MTJvR0BaMQrq0pmE=
|
||||||
golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0=
|
golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY=
|
||||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||||
@ -493,12 +491,12 @@ google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoA
|
|||||||
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
|
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
|
||||||
google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||||
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
|
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
|
||||||
google.golang.org/genproto v0.0.0-20231211222908-989df2bf70f3 h1:1hfbdAfFbkmpg41000wDVqr7jUpK/Yo+LPnIxxGzmkg=
|
google.golang.org/genproto v0.0.0-20231212172506-995d672761c0 h1:YJ5pD9rF8o9Qtta0Cmy9rdBwkSjrTCT6XTiUQVOtIos=
|
||||||
google.golang.org/genproto v0.0.0-20231211222908-989df2bf70f3/go.mod h1:5RBcpGRxr25RbDzY5w+dmaqpSEvl8Gwl1x2CICf60ic=
|
google.golang.org/genproto v0.0.0-20231212172506-995d672761c0/go.mod h1:l/k7rMz0vFTBPy+tFSGvXEd3z+BcoG1k7EHbqm+YBsY=
|
||||||
google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 h1:JpwMPBpFN3uKhdaekDpiNlImDdkUAyiJ6ez/uxGaUSo=
|
google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917 h1:rcS6EyEaoCO52hQDupoSfrxI3R6C2Tq741is7X8OvnM=
|
||||||
google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:0xJLfVdJqpAPl8tDg1ujOCGzx6LFLttXT5NhllGOXY4=
|
google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917/go.mod h1:CmlNWB9lSezaYELKS5Ym1r44VrrbPUa7JTvw+6MbpJ0=
|
||||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20231212172506-995d672761c0 h1:/jFB8jK5R3Sq3i/lmeZO0cATSzFfZaJq1J2Euan3XKU=
|
google.golang.org/genproto/googleapis/rpc v0.0.0-20240102182953-50ed04b92917 h1:6G8oQ016D88m1xAKljMlBOOGWDZkes4kMhgGFlf8WcQ=
|
||||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20231212172506-995d672761c0/go.mod h1:FUoWkonphQm3RhTS+kOEhF8h0iDpm4tdXolVCeZ9KKA=
|
google.golang.org/genproto/googleapis/rpc v0.0.0-20240102182953-50ed04b92917/go.mod h1:xtjpI3tXFPP051KaWnhvxkiubL/6dJ18vLVf7q2pTOU=
|
||||||
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
||||||
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
|
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
|
||||||
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
|
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
|
||||||
|
6
vendor/github.com/felixge/httpsnoop/.travis.yml
generated
vendored
6
vendor/github.com/felixge/httpsnoop/.travis.yml
generated
vendored
@ -1,6 +0,0 @@
|
|||||||
language: go
|
|
||||||
|
|
||||||
go:
|
|
||||||
- 1.6
|
|
||||||
- 1.7
|
|
||||||
- 1.8
|
|
2
vendor/github.com/felixge/httpsnoop/Makefile
generated
vendored
2
vendor/github.com/felixge/httpsnoop/Makefile
generated
vendored
@ -1,7 +1,7 @@
|
|||||||
.PHONY: ci generate clean
|
.PHONY: ci generate clean
|
||||||
|
|
||||||
ci: clean generate
|
ci: clean generate
|
||||||
go test -v ./...
|
go test -race -v ./...
|
||||||
|
|
||||||
generate:
|
generate:
|
||||||
go generate .
|
go generate .
|
||||||
|
4
vendor/github.com/felixge/httpsnoop/README.md
generated
vendored
4
vendor/github.com/felixge/httpsnoop/README.md
generated
vendored
@ -7,8 +7,8 @@ http.Handlers.
|
|||||||
Doing this requires non-trivial wrapping of the http.ResponseWriter interface,
|
Doing this requires non-trivial wrapping of the http.ResponseWriter interface,
|
||||||
which is also exposed for users interested in a more low-level API.
|
which is also exposed for users interested in a more low-level API.
|
||||||
|
|
||||||
[](https://godoc.org/github.com/felixge/httpsnoop)
|
[](https://pkg.go.dev/github.com/felixge/httpsnoop)
|
||||||
[](https://travis-ci.org/felixge/httpsnoop)
|
[](https://github.com/felixge/httpsnoop/actions/workflows/main.yaml)
|
||||||
|
|
||||||
## Usage Example
|
## Usage Example
|
||||||
|
|
||||||
|
2
vendor/github.com/felixge/httpsnoop/capture_metrics.go
generated
vendored
2
vendor/github.com/felixge/httpsnoop/capture_metrics.go
generated
vendored
@ -52,7 +52,7 @@ func (m *Metrics) CaptureMetrics(w http.ResponseWriter, fn func(http.ResponseWri
|
|||||||
return func(code int) {
|
return func(code int) {
|
||||||
next(code)
|
next(code)
|
||||||
|
|
||||||
if !headerWritten {
|
if !(code >= 100 && code <= 199) && !headerWritten {
|
||||||
m.Code = code
|
m.Code = code
|
||||||
headerWritten = true
|
headerWritten = true
|
||||||
}
|
}
|
||||||
|
2
vendor/github.com/felixge/httpsnoop/wrap_generated_gteq_1.8.go
generated
vendored
2
vendor/github.com/felixge/httpsnoop/wrap_generated_gteq_1.8.go
generated
vendored
@ -1,5 +1,5 @@
|
|||||||
// +build go1.8
|
// +build go1.8
|
||||||
// Code generated by "httpsnoop/codegen"; DO NOT EDIT
|
// Code generated by "httpsnoop/codegen"; DO NOT EDIT.
|
||||||
|
|
||||||
package httpsnoop
|
package httpsnoop
|
||||||
|
|
||||||
|
2
vendor/github.com/felixge/httpsnoop/wrap_generated_lt_1.8.go
generated
vendored
2
vendor/github.com/felixge/httpsnoop/wrap_generated_lt_1.8.go
generated
vendored
@ -1,5 +1,5 @@
|
|||||||
// +build !go1.8
|
// +build !go1.8
|
||||||
// Code generated by "httpsnoop/codegen"; DO NOT EDIT
|
// Code generated by "httpsnoop/codegen"; DO NOT EDIT.
|
||||||
|
|
||||||
package httpsnoop
|
package httpsnoop
|
||||||
|
|
||||||
|
2
vendor/github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule/BUILD.bazel
generated
vendored
2
vendor/github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule/BUILD.bazel
generated
vendored
@ -24,7 +24,7 @@ go_test(
|
|||||||
embed = [":httprule"],
|
embed = [":httprule"],
|
||||||
deps = [
|
deps = [
|
||||||
"//utilities",
|
"//utilities",
|
||||||
"@com_github_golang_glog//:glog",
|
"@org_golang_google_grpc//grpclog",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
4
vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/errors.go
generated
vendored
4
vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/errors.go
generated
vendored
@ -137,7 +137,7 @@ func DefaultHTTPErrorHandler(ctx context.Context, mux *ServeMux, marshaler Marsh
|
|||||||
doForwardTrailers := requestAcceptsTrailers(r)
|
doForwardTrailers := requestAcceptsTrailers(r)
|
||||||
|
|
||||||
if doForwardTrailers {
|
if doForwardTrailers {
|
||||||
handleForwardResponseTrailerHeader(w, md)
|
handleForwardResponseTrailerHeader(w, mux, md)
|
||||||
w.Header().Set("Transfer-Encoding", "chunked")
|
w.Header().Set("Transfer-Encoding", "chunked")
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -152,7 +152,7 @@ func DefaultHTTPErrorHandler(ctx context.Context, mux *ServeMux, marshaler Marsh
|
|||||||
}
|
}
|
||||||
|
|
||||||
if doForwardTrailers {
|
if doForwardTrailers {
|
||||||
handleForwardResponseTrailer(w, md)
|
handleForwardResponseTrailer(w, mux, md)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/fieldmask.go
generated
vendored
2
vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/fieldmask.go
generated
vendored
@ -27,7 +27,7 @@ func FieldMaskFromRequestBody(r io.Reader, msg proto.Message) (*field_mask.Field
|
|||||||
var root interface{}
|
var root interface{}
|
||||||
|
|
||||||
if err := json.NewDecoder(r).Decode(&root); err != nil {
|
if err := json.NewDecoder(r).Decode(&root); err != nil {
|
||||||
if err == io.EOF {
|
if errors.Is(err, io.EOF) {
|
||||||
return fm, nil
|
return fm, nil
|
||||||
}
|
}
|
||||||
return nil, err
|
return nil, err
|
||||||
|
26
vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/handler.go
generated
vendored
26
vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/handler.go
generated
vendored
@ -2,7 +2,7 @@ package runtime
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"errors"
|
||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/textproto"
|
"net/textproto"
|
||||||
@ -48,7 +48,7 @@ func ForwardResponseStream(ctx context.Context, mux *ServeMux, marshaler Marshal
|
|||||||
var wroteHeader bool
|
var wroteHeader bool
|
||||||
for {
|
for {
|
||||||
resp, err := recv()
|
resp, err := recv()
|
||||||
if err == io.EOF {
|
if errors.Is(err, io.EOF) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -108,18 +108,20 @@ func handleForwardResponseServerMetadata(w http.ResponseWriter, mux *ServeMux, m
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func handleForwardResponseTrailerHeader(w http.ResponseWriter, md ServerMetadata) {
|
func handleForwardResponseTrailerHeader(w http.ResponseWriter, mux *ServeMux, md ServerMetadata) {
|
||||||
for k := range md.TrailerMD {
|
for k := range md.TrailerMD {
|
||||||
tKey := textproto.CanonicalMIMEHeaderKey(fmt.Sprintf("%s%s", MetadataTrailerPrefix, k))
|
if h, ok := mux.outgoingTrailerMatcher(k); ok {
|
||||||
w.Header().Add("Trailer", tKey)
|
w.Header().Add("Trailer", textproto.CanonicalMIMEHeaderKey(h))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func handleForwardResponseTrailer(w http.ResponseWriter, md ServerMetadata) {
|
func handleForwardResponseTrailer(w http.ResponseWriter, mux *ServeMux, md ServerMetadata) {
|
||||||
for k, vs := range md.TrailerMD {
|
for k, vs := range md.TrailerMD {
|
||||||
tKey := fmt.Sprintf("%s%s", MetadataTrailerPrefix, k)
|
if h, ok := mux.outgoingTrailerMatcher(k); ok {
|
||||||
for _, v := range vs {
|
for _, v := range vs {
|
||||||
w.Header().Add(tKey, v)
|
w.Header().Add(h, v)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -147,12 +149,10 @@ func ForwardResponseMessage(ctx context.Context, mux *ServeMux, marshaler Marsha
|
|||||||
doForwardTrailers := requestAcceptsTrailers(req)
|
doForwardTrailers := requestAcceptsTrailers(req)
|
||||||
|
|
||||||
if doForwardTrailers {
|
if doForwardTrailers {
|
||||||
handleForwardResponseTrailerHeader(w, md)
|
handleForwardResponseTrailerHeader(w, mux, md)
|
||||||
w.Header().Set("Transfer-Encoding", "chunked")
|
w.Header().Set("Transfer-Encoding", "chunked")
|
||||||
}
|
}
|
||||||
|
|
||||||
handleForwardResponseTrailerHeader(w, md)
|
|
||||||
|
|
||||||
contentType := marshaler.ContentType(resp)
|
contentType := marshaler.ContentType(resp)
|
||||||
w.Header().Set("Content-Type", contentType)
|
w.Header().Set("Content-Type", contentType)
|
||||||
|
|
||||||
@ -178,7 +178,7 @@ func ForwardResponseMessage(ctx context.Context, mux *ServeMux, marshaler Marsha
|
|||||||
}
|
}
|
||||||
|
|
||||||
if doForwardTrailers {
|
if doForwardTrailers {
|
||||||
handleForwardResponseTrailer(w, md)
|
handleForwardResponseTrailer(w, mux, md)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
32
vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/mux.go
generated
vendored
32
vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/mux.go
generated
vendored
@ -57,6 +57,7 @@ type ServeMux struct {
|
|||||||
marshalers marshalerRegistry
|
marshalers marshalerRegistry
|
||||||
incomingHeaderMatcher HeaderMatcherFunc
|
incomingHeaderMatcher HeaderMatcherFunc
|
||||||
outgoingHeaderMatcher HeaderMatcherFunc
|
outgoingHeaderMatcher HeaderMatcherFunc
|
||||||
|
outgoingTrailerMatcher HeaderMatcherFunc
|
||||||
metadataAnnotators []func(context.Context, *http.Request) metadata.MD
|
metadataAnnotators []func(context.Context, *http.Request) metadata.MD
|
||||||
errorHandler ErrorHandlerFunc
|
errorHandler ErrorHandlerFunc
|
||||||
streamErrorHandler StreamErrorHandlerFunc
|
streamErrorHandler StreamErrorHandlerFunc
|
||||||
@ -114,10 +115,18 @@ func DefaultHeaderMatcher(key string) (string, bool) {
|
|||||||
return "", false
|
return "", false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func defaultOutgoingHeaderMatcher(key string) (string, bool) {
|
||||||
|
return fmt.Sprintf("%s%s", MetadataHeaderPrefix, key), true
|
||||||
|
}
|
||||||
|
|
||||||
|
func defaultOutgoingTrailerMatcher(key string) (string, bool) {
|
||||||
|
return fmt.Sprintf("%s%s", MetadataTrailerPrefix, key), true
|
||||||
|
}
|
||||||
|
|
||||||
// WithIncomingHeaderMatcher returns a ServeMuxOption representing a headerMatcher for incoming request to gateway.
|
// WithIncomingHeaderMatcher returns a ServeMuxOption representing a headerMatcher for incoming request to gateway.
|
||||||
//
|
//
|
||||||
// This matcher will be called with each header in http.Request. If matcher returns true, that header will be
|
// This matcher will be called with each header in http.Request. If matcher returns true, that header will be
|
||||||
// passed to gRPC context. To transform the header before passing to gRPC context, matcher should return modified header.
|
// passed to gRPC context. To transform the header before passing to gRPC context, matcher should return the modified header.
|
||||||
func WithIncomingHeaderMatcher(fn HeaderMatcherFunc) ServeMuxOption {
|
func WithIncomingHeaderMatcher(fn HeaderMatcherFunc) ServeMuxOption {
|
||||||
for _, header := range fn.matchedMalformedHeaders() {
|
for _, header := range fn.matchedMalformedHeaders() {
|
||||||
grpclog.Warningf("The configured forwarding filter would allow %q to be sent to the gRPC server, which will likely cause errors. See https://github.com/grpc/grpc-go/pull/4803#issuecomment-986093310 for more information.", header)
|
grpclog.Warningf("The configured forwarding filter would allow %q to be sent to the gRPC server, which will likely cause errors. See https://github.com/grpc/grpc-go/pull/4803#issuecomment-986093310 for more information.", header)
|
||||||
@ -147,13 +156,24 @@ func (fn HeaderMatcherFunc) matchedMalformedHeaders() []string {
|
|||||||
//
|
//
|
||||||
// This matcher will be called with each header in response header metadata. If matcher returns true, that header will be
|
// This matcher will be called with each header in response header metadata. If matcher returns true, that header will be
|
||||||
// passed to http response returned from gateway. To transform the header before passing to response,
|
// passed to http response returned from gateway. To transform the header before passing to response,
|
||||||
// matcher should return modified header.
|
// matcher should return the modified header.
|
||||||
func WithOutgoingHeaderMatcher(fn HeaderMatcherFunc) ServeMuxOption {
|
func WithOutgoingHeaderMatcher(fn HeaderMatcherFunc) ServeMuxOption {
|
||||||
return func(mux *ServeMux) {
|
return func(mux *ServeMux) {
|
||||||
mux.outgoingHeaderMatcher = fn
|
mux.outgoingHeaderMatcher = fn
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// WithOutgoingTrailerMatcher returns a ServeMuxOption representing a headerMatcher for outgoing response from gateway.
|
||||||
|
//
|
||||||
|
// This matcher will be called with each header in response trailer metadata. If matcher returns true, that header will be
|
||||||
|
// passed to http response returned from gateway. To transform the header before passing to response,
|
||||||
|
// matcher should return the modified header.
|
||||||
|
func WithOutgoingTrailerMatcher(fn HeaderMatcherFunc) ServeMuxOption {
|
||||||
|
return func(mux *ServeMux) {
|
||||||
|
mux.outgoingTrailerMatcher = fn
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// WithMetadata returns a ServeMuxOption for passing metadata to a gRPC context.
|
// WithMetadata returns a ServeMuxOption for passing metadata to a gRPC context.
|
||||||
//
|
//
|
||||||
// This can be used by services that need to read from http.Request and modify gRPC context. A common use case
|
// This can be used by services that need to read from http.Request and modify gRPC context. A common use case
|
||||||
@ -273,11 +293,11 @@ func NewServeMux(opts ...ServeMuxOption) *ServeMux {
|
|||||||
if serveMux.incomingHeaderMatcher == nil {
|
if serveMux.incomingHeaderMatcher == nil {
|
||||||
serveMux.incomingHeaderMatcher = DefaultHeaderMatcher
|
serveMux.incomingHeaderMatcher = DefaultHeaderMatcher
|
||||||
}
|
}
|
||||||
|
|
||||||
if serveMux.outgoingHeaderMatcher == nil {
|
if serveMux.outgoingHeaderMatcher == nil {
|
||||||
serveMux.outgoingHeaderMatcher = func(key string) (string, bool) {
|
serveMux.outgoingHeaderMatcher = defaultOutgoingHeaderMatcher
|
||||||
return fmt.Sprintf("%s%s", MetadataHeaderPrefix, key), true
|
}
|
||||||
}
|
if serveMux.outgoingTrailerMatcher == nil {
|
||||||
|
serveMux.outgoingTrailerMatcher = defaultOutgoingTrailerMatcher
|
||||||
}
|
}
|
||||||
|
|
||||||
return serveMux
|
return serveMux
|
||||||
|
@ -18,6 +18,7 @@ import (
|
|||||||
"go.opentelemetry.io/otel"
|
"go.opentelemetry.io/otel"
|
||||||
"go.opentelemetry.io/otel/attribute"
|
"go.opentelemetry.io/otel/attribute"
|
||||||
"go.opentelemetry.io/otel/metric"
|
"go.opentelemetry.io/otel/metric"
|
||||||
|
"go.opentelemetry.io/otel/metric/noop"
|
||||||
"go.opentelemetry.io/otel/propagation"
|
"go.opentelemetry.io/otel/propagation"
|
||||||
semconv "go.opentelemetry.io/otel/semconv/v1.17.0"
|
semconv "go.opentelemetry.io/otel/semconv/v1.17.0"
|
||||||
"go.opentelemetry.io/otel/trace"
|
"go.opentelemetry.io/otel/trace"
|
||||||
@ -89,6 +90,9 @@ func newConfig(opts []Option, role string) *config {
|
|||||||
metric.WithUnit("ms"))
|
metric.WithUnit("ms"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
otel.Handle(err)
|
otel.Handle(err)
|
||||||
|
if c.rpcDuration == nil {
|
||||||
|
c.rpcDuration = noop.Float64Histogram{}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
c.rpcRequestSize, err = c.meter.Int64Histogram("rpc."+role+".request.size",
|
c.rpcRequestSize, err = c.meter.Int64Histogram("rpc."+role+".request.size",
|
||||||
@ -96,6 +100,9 @@ func newConfig(opts []Option, role string) *config {
|
|||||||
metric.WithUnit("By"))
|
metric.WithUnit("By"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
otel.Handle(err)
|
otel.Handle(err)
|
||||||
|
if c.rpcRequestSize == nil {
|
||||||
|
c.rpcRequestSize = noop.Int64Histogram{}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
c.rpcResponseSize, err = c.meter.Int64Histogram("rpc."+role+".response.size",
|
c.rpcResponseSize, err = c.meter.Int64Histogram("rpc."+role+".response.size",
|
||||||
@ -103,6 +110,9 @@ func newConfig(opts []Option, role string) *config {
|
|||||||
metric.WithUnit("By"))
|
metric.WithUnit("By"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
otel.Handle(err)
|
otel.Handle(err)
|
||||||
|
if c.rpcResponseSize == nil {
|
||||||
|
c.rpcResponseSize = noop.Int64Histogram{}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
c.rpcRequestsPerRPC, err = c.meter.Int64Histogram("rpc."+role+".requests_per_rpc",
|
c.rpcRequestsPerRPC, err = c.meter.Int64Histogram("rpc."+role+".requests_per_rpc",
|
||||||
@ -110,6 +120,9 @@ func newConfig(opts []Option, role string) *config {
|
|||||||
metric.WithUnit("{count}"))
|
metric.WithUnit("{count}"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
otel.Handle(err)
|
otel.Handle(err)
|
||||||
|
if c.rpcRequestsPerRPC == nil {
|
||||||
|
c.rpcRequestsPerRPC = noop.Int64Histogram{}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
c.rpcResponsesPerRPC, err = c.meter.Int64Histogram("rpc."+role+".responses_per_rpc",
|
c.rpcResponsesPerRPC, err = c.meter.Int64Histogram("rpc."+role+".responses_per_rpc",
|
||||||
@ -117,6 +130,9 @@ func newConfig(opts []Option, role string) *config {
|
|||||||
metric.WithUnit("{count}"))
|
metric.WithUnit("{count}"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
otel.Handle(err)
|
otel.Handle(err)
|
||||||
|
if c.rpcResponsesPerRPC == nil {
|
||||||
|
c.rpcResponsesPerRPC = noop.Int64Histogram{}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return c
|
return c
|
||||||
|
@ -20,6 +20,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
grpc_codes "google.golang.org/grpc/codes"
|
grpc_codes "google.golang.org/grpc/codes"
|
||||||
|
"google.golang.org/grpc/peer"
|
||||||
"google.golang.org/grpc/stats"
|
"google.golang.org/grpc/stats"
|
||||||
"google.golang.org/grpc/status"
|
"google.golang.org/grpc/status"
|
||||||
|
|
||||||
@ -43,7 +44,7 @@ type serverHandler struct {
|
|||||||
*config
|
*config
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewServerHandler creates a stats.Handler for gRPC server.
|
// NewServerHandler creates a stats.Handler for a gRPC server.
|
||||||
func NewServerHandler(opts ...Option) stats.Handler {
|
func NewServerHandler(opts ...Option) stats.Handler {
|
||||||
h := &serverHandler{
|
h := &serverHandler{
|
||||||
config: newConfig(opts, "server"),
|
config: newConfig(opts, "server"),
|
||||||
@ -54,9 +55,6 @@ func NewServerHandler(opts ...Option) stats.Handler {
|
|||||||
|
|
||||||
// TagConn can attach some information to the given context.
|
// TagConn can attach some information to the given context.
|
||||||
func (h *serverHandler) TagConn(ctx context.Context, info *stats.ConnTagInfo) context.Context {
|
func (h *serverHandler) TagConn(ctx context.Context, info *stats.ConnTagInfo) context.Context {
|
||||||
span := trace.SpanFromContext(ctx)
|
|
||||||
attrs := peerAttr(peerFromCtx(ctx))
|
|
||||||
span.SetAttributes(attrs...)
|
|
||||||
return ctx
|
return ctx
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -85,14 +83,15 @@ func (h *serverHandler) TagRPC(ctx context.Context, info *stats.RPCTagInfo) cont
|
|||||||
|
|
||||||
// HandleRPC processes the RPC stats.
|
// HandleRPC processes the RPC stats.
|
||||||
func (h *serverHandler) HandleRPC(ctx context.Context, rs stats.RPCStats) {
|
func (h *serverHandler) HandleRPC(ctx context.Context, rs stats.RPCStats) {
|
||||||
h.handleRPC(ctx, rs)
|
isServer := true
|
||||||
|
h.handleRPC(ctx, rs, isServer)
|
||||||
}
|
}
|
||||||
|
|
||||||
type clientHandler struct {
|
type clientHandler struct {
|
||||||
*config
|
*config
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewClientHandler creates a stats.Handler for gRPC client.
|
// NewClientHandler creates a stats.Handler for a gRPC client.
|
||||||
func NewClientHandler(opts ...Option) stats.Handler {
|
func NewClientHandler(opts ...Option) stats.Handler {
|
||||||
h := &clientHandler{
|
h := &clientHandler{
|
||||||
config: newConfig(opts, "client"),
|
config: newConfig(opts, "client"),
|
||||||
@ -121,14 +120,12 @@ func (h *clientHandler) TagRPC(ctx context.Context, info *stats.RPCTagInfo) cont
|
|||||||
|
|
||||||
// HandleRPC processes the RPC stats.
|
// HandleRPC processes the RPC stats.
|
||||||
func (h *clientHandler) HandleRPC(ctx context.Context, rs stats.RPCStats) {
|
func (h *clientHandler) HandleRPC(ctx context.Context, rs stats.RPCStats) {
|
||||||
h.handleRPC(ctx, rs)
|
isServer := false
|
||||||
|
h.handleRPC(ctx, rs, isServer)
|
||||||
}
|
}
|
||||||
|
|
||||||
// TagConn can attach some information to the given context.
|
// TagConn can attach some information to the given context.
|
||||||
func (h *clientHandler) TagConn(ctx context.Context, cti *stats.ConnTagInfo) context.Context {
|
func (h *clientHandler) TagConn(ctx context.Context, info *stats.ConnTagInfo) context.Context {
|
||||||
span := trace.SpanFromContext(ctx)
|
|
||||||
attrs := peerAttr(cti.RemoteAddr.String())
|
|
||||||
span.SetAttributes(attrs...)
|
|
||||||
return ctx
|
return ctx
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -137,20 +134,23 @@ func (h *clientHandler) HandleConn(context.Context, stats.ConnStats) {
|
|||||||
// no-op
|
// no-op
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *config) handleRPC(ctx context.Context, rs stats.RPCStats) {
|
func (c *config) handleRPC(ctx context.Context, rs stats.RPCStats, isServer bool) { // nolint: revive // isServer is not a control flag.
|
||||||
span := trace.SpanFromContext(ctx)
|
span := trace.SpanFromContext(ctx)
|
||||||
gctx, _ := ctx.Value(gRPCContextKey{}).(*gRPCContext)
|
var metricAttrs []attribute.KeyValue
|
||||||
var messageId int64
|
var messageId int64
|
||||||
metricAttrs := make([]attribute.KeyValue, 0, len(gctx.metricAttrs)+1)
|
|
||||||
metricAttrs = append(metricAttrs, gctx.metricAttrs...)
|
gctx, _ := ctx.Value(gRPCContextKey{}).(*gRPCContext)
|
||||||
wctx := withoutCancel(ctx)
|
if gctx != nil {
|
||||||
|
metricAttrs = make([]attribute.KeyValue, 0, len(gctx.metricAttrs)+1)
|
||||||
|
metricAttrs = append(metricAttrs, gctx.metricAttrs...)
|
||||||
|
}
|
||||||
|
|
||||||
switch rs := rs.(type) {
|
switch rs := rs.(type) {
|
||||||
case *stats.Begin:
|
case *stats.Begin:
|
||||||
case *stats.InPayload:
|
case *stats.InPayload:
|
||||||
if gctx != nil {
|
if gctx != nil {
|
||||||
messageId = atomic.AddInt64(&gctx.messagesReceived, 1)
|
messageId = atomic.AddInt64(&gctx.messagesReceived, 1)
|
||||||
c.rpcRequestSize.Record(wctx, int64(rs.Length), metric.WithAttributes(metricAttrs...))
|
c.rpcRequestSize.Record(ctx, int64(rs.Length), metric.WithAttributes(metricAttrs...))
|
||||||
}
|
}
|
||||||
|
|
||||||
if c.ReceivedEvent {
|
if c.ReceivedEvent {
|
||||||
@ -166,7 +166,7 @@ func (c *config) handleRPC(ctx context.Context, rs stats.RPCStats) {
|
|||||||
case *stats.OutPayload:
|
case *stats.OutPayload:
|
||||||
if gctx != nil {
|
if gctx != nil {
|
||||||
messageId = atomic.AddInt64(&gctx.messagesSent, 1)
|
messageId = atomic.AddInt64(&gctx.messagesSent, 1)
|
||||||
c.rpcResponseSize.Record(wctx, int64(rs.Length), metric.WithAttributes(metricAttrs...))
|
c.rpcResponseSize.Record(ctx, int64(rs.Length), metric.WithAttributes(metricAttrs...))
|
||||||
}
|
}
|
||||||
|
|
||||||
if c.SentEvent {
|
if c.SentEvent {
|
||||||
@ -180,12 +180,21 @@ func (c *config) handleRPC(ctx context.Context, rs stats.RPCStats) {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
case *stats.OutTrailer:
|
case *stats.OutTrailer:
|
||||||
|
case *stats.OutHeader:
|
||||||
|
if p, ok := peer.FromContext(ctx); ok {
|
||||||
|
span.SetAttributes(peerAttr(p.Addr.String())...)
|
||||||
|
}
|
||||||
case *stats.End:
|
case *stats.End:
|
||||||
var rpcStatusAttr attribute.KeyValue
|
var rpcStatusAttr attribute.KeyValue
|
||||||
|
|
||||||
if rs.Error != nil {
|
if rs.Error != nil {
|
||||||
s, _ := status.FromError(rs.Error)
|
s, _ := status.FromError(rs.Error)
|
||||||
span.SetStatus(codes.Error, s.Message())
|
if isServer {
|
||||||
|
statusCode, msg := serverStatus(s)
|
||||||
|
span.SetStatus(statusCode, msg)
|
||||||
|
} else {
|
||||||
|
span.SetStatus(codes.Error, s.Message())
|
||||||
|
}
|
||||||
rpcStatusAttr = semconv.RPCGRPCStatusCodeKey.Int(int(s.Code()))
|
rpcStatusAttr = semconv.RPCGRPCStatusCodeKey.Int(int(s.Code()))
|
||||||
} else {
|
} else {
|
||||||
rpcStatusAttr = semconv.RPCGRPCStatusCodeKey.Int(int(grpc_codes.OK))
|
rpcStatusAttr = semconv.RPCGRPCStatusCodeKey.Int(int(grpc_codes.OK))
|
||||||
@ -198,41 +207,12 @@ func (c *config) handleRPC(ctx context.Context, rs stats.RPCStats) {
|
|||||||
// Use floating point division here for higher precision (instead of Millisecond method).
|
// Use floating point division here for higher precision (instead of Millisecond method).
|
||||||
elapsedTime := float64(rs.EndTime.Sub(rs.BeginTime)) / float64(time.Millisecond)
|
elapsedTime := float64(rs.EndTime.Sub(rs.BeginTime)) / float64(time.Millisecond)
|
||||||
|
|
||||||
c.rpcDuration.Record(wctx, elapsedTime, metric.WithAttributes(metricAttrs...))
|
c.rpcDuration.Record(ctx, elapsedTime, metric.WithAttributes(metricAttrs...))
|
||||||
c.rpcRequestsPerRPC.Record(wctx, atomic.LoadInt64(&gctx.messagesReceived), metric.WithAttributes(metricAttrs...))
|
if gctx != nil {
|
||||||
c.rpcResponsesPerRPC.Record(wctx, atomic.LoadInt64(&gctx.messagesSent), metric.WithAttributes(metricAttrs...))
|
c.rpcRequestsPerRPC.Record(ctx, atomic.LoadInt64(&gctx.messagesReceived), metric.WithAttributes(metricAttrs...))
|
||||||
|
c.rpcResponsesPerRPC.Record(ctx, atomic.LoadInt64(&gctx.messagesSent), metric.WithAttributes(metricAttrs...))
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func withoutCancel(parent context.Context) context.Context {
|
|
||||||
if parent == nil {
|
|
||||||
panic("cannot create context from nil parent")
|
|
||||||
}
|
|
||||||
return withoutCancelCtx{parent}
|
|
||||||
}
|
|
||||||
|
|
||||||
type withoutCancelCtx struct {
|
|
||||||
c context.Context
|
|
||||||
}
|
|
||||||
|
|
||||||
func (withoutCancelCtx) Deadline() (deadline time.Time, ok bool) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
func (withoutCancelCtx) Done() <-chan struct{} {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (withoutCancelCtx) Err() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (w withoutCancelCtx) Value(key any) any {
|
|
||||||
return w.c.Value(key)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (w withoutCancelCtx) String() string {
|
|
||||||
return "withoutCancel"
|
|
||||||
}
|
|
||||||
|
@ -16,7 +16,7 @@ package otelgrpc // import "go.opentelemetry.io/contrib/instrumentation/google.g
|
|||||||
|
|
||||||
// Version is the current release version of the gRPC instrumentation.
|
// Version is the current release version of the gRPC instrumentation.
|
||||||
func Version() string {
|
func Version() string {
|
||||||
return "0.46.1"
|
return "0.48.0"
|
||||||
// This string is updated by the pre_release.sh script during release
|
// This string is updated by the pre_release.sh script during release
|
||||||
}
|
}
|
||||||
|
|
||||||
|
22
vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/common.go
generated
vendored
22
vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/common.go
generated
vendored
@ -31,10 +31,24 @@ const (
|
|||||||
|
|
||||||
// Server HTTP metrics.
|
// Server HTTP metrics.
|
||||||
const (
|
const (
|
||||||
RequestCount = "http.server.request_count" // Incoming request count total
|
// Deprecated: This field is unused.
|
||||||
RequestContentLength = "http.server.request_content_length" // Incoming request bytes total
|
RequestCount = "http.server.request_count" // Incoming request count total
|
||||||
|
// Deprecated: Use of this field has been migrated to serverRequestSize. It will be removed in a future version.
|
||||||
|
RequestContentLength = "http.server.request_content_length" // Incoming request bytes total
|
||||||
|
// Deprecated: Use of this field has been migrated to serverResponseSize. It will be removed in a future version.
|
||||||
ResponseContentLength = "http.server.response_content_length" // Incoming response bytes total
|
ResponseContentLength = "http.server.response_content_length" // Incoming response bytes total
|
||||||
ServerLatency = "http.server.duration" // Incoming end to end duration, microseconds
|
// Deprecated: Use of this field has been migrated to serverDuration. It will be removed in a future version.
|
||||||
|
ServerLatency = "http.server.duration" // Incoming end to end duration, milliseconds
|
||||||
|
serverRequestSize = "http.server.request.size" // Incoming request bytes total
|
||||||
|
serverResponseSize = "http.server.response.size" // Incoming response bytes total
|
||||||
|
serverDuration = "http.server.duration" // Incoming end to end duration, milliseconds
|
||||||
|
)
|
||||||
|
|
||||||
|
// Client HTTP metrics.
|
||||||
|
const (
|
||||||
|
clientRequestSize = "http.client.request.size" // Outgoing request bytes total
|
||||||
|
clientResponseSize = "http.client.response.size" // Outgoing response bytes total
|
||||||
|
clientDuration = "http.client.duration" // Outgoing end to end duration, milliseconds
|
||||||
)
|
)
|
||||||
|
|
||||||
// Filter is a predicate used to determine whether a given http.request should
|
// Filter is a predicate used to determine whether a given http.request should
|
||||||
@ -42,5 +56,5 @@ const (
|
|||||||
type Filter func(*http.Request) bool
|
type Filter func(*http.Request) bool
|
||||||
|
|
||||||
func newTracer(tp trace.TracerProvider) trace.Tracer {
|
func newTracer(tp trace.TracerProvider) trace.Tracer {
|
||||||
return tp.Tracer(instrumentationName, trace.WithInstrumentationVersion(Version()))
|
return tp.Tracer(ScopeName, trace.WithInstrumentationVersion(Version()))
|
||||||
}
|
}
|
||||||
|
7
vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/config.go
generated
vendored
7
vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/config.go
generated
vendored
@ -25,9 +25,8 @@ import (
|
|||||||
"go.opentelemetry.io/otel/trace"
|
"go.opentelemetry.io/otel/trace"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
// ScopeName is the instrumentation scope name.
|
||||||
instrumentationName = "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"
|
const ScopeName = "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"
|
||||||
)
|
|
||||||
|
|
||||||
// config represents the configuration options available for the http.Handler
|
// config represents the configuration options available for the http.Handler
|
||||||
// and http.Transport types.
|
// and http.Transport types.
|
||||||
@ -76,7 +75,7 @@ func newConfig(opts ...Option) *config {
|
|||||||
}
|
}
|
||||||
|
|
||||||
c.Meter = c.MeterProvider.Meter(
|
c.Meter = c.MeterProvider.Meter(
|
||||||
instrumentationName,
|
ScopeName,
|
||||||
metric.WithInstrumentationVersion(Version()),
|
metric.WithInstrumentationVersion(Version()),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
40
vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/handler.go
generated
vendored
40
vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/handler.go
generated
vendored
@ -26,7 +26,7 @@ import (
|
|||||||
"go.opentelemetry.io/otel/attribute"
|
"go.opentelemetry.io/otel/attribute"
|
||||||
"go.opentelemetry.io/otel/metric"
|
"go.opentelemetry.io/otel/metric"
|
||||||
"go.opentelemetry.io/otel/propagation"
|
"go.opentelemetry.io/otel/propagation"
|
||||||
semconv "go.opentelemetry.io/otel/semconv/v1.17.0"
|
semconv "go.opentelemetry.io/otel/semconv/v1.20.0"
|
||||||
"go.opentelemetry.io/otel/trace"
|
"go.opentelemetry.io/otel/trace"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -43,10 +43,12 @@ type middleware struct {
|
|||||||
writeEvent bool
|
writeEvent bool
|
||||||
filters []Filter
|
filters []Filter
|
||||||
spanNameFormatter func(string, *http.Request) string
|
spanNameFormatter func(string, *http.Request) string
|
||||||
counters map[string]metric.Int64Counter
|
|
||||||
valueRecorders map[string]metric.Float64Histogram
|
|
||||||
publicEndpoint bool
|
publicEndpoint bool
|
||||||
publicEndpointFn func(*http.Request) bool
|
publicEndpointFn func(*http.Request) bool
|
||||||
|
|
||||||
|
requestBytesCounter metric.Int64Counter
|
||||||
|
responseBytesCounter metric.Int64Counter
|
||||||
|
serverLatencyMeasure metric.Float64Histogram
|
||||||
}
|
}
|
||||||
|
|
||||||
func defaultHandlerFormatter(operation string, _ *http.Request) string {
|
func defaultHandlerFormatter(operation string, _ *http.Request) string {
|
||||||
@ -104,21 +106,27 @@ func handleErr(err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (h *middleware) createMeasures() {
|
func (h *middleware) createMeasures() {
|
||||||
h.counters = make(map[string]metric.Int64Counter)
|
var err error
|
||||||
h.valueRecorders = make(map[string]metric.Float64Histogram)
|
h.requestBytesCounter, err = h.meter.Int64Counter(
|
||||||
|
serverRequestSize,
|
||||||
requestBytesCounter, err := h.meter.Int64Counter(RequestContentLength)
|
metric.WithUnit("By"),
|
||||||
|
metric.WithDescription("Measures the size of HTTP request messages."),
|
||||||
|
)
|
||||||
handleErr(err)
|
handleErr(err)
|
||||||
|
|
||||||
responseBytesCounter, err := h.meter.Int64Counter(ResponseContentLength)
|
h.responseBytesCounter, err = h.meter.Int64Counter(
|
||||||
|
serverResponseSize,
|
||||||
|
metric.WithUnit("By"),
|
||||||
|
metric.WithDescription("Measures the size of HTTP response messages."),
|
||||||
|
)
|
||||||
handleErr(err)
|
handleErr(err)
|
||||||
|
|
||||||
serverLatencyMeasure, err := h.meter.Float64Histogram(ServerLatency)
|
h.serverLatencyMeasure, err = h.meter.Float64Histogram(
|
||||||
|
serverDuration,
|
||||||
|
metric.WithUnit("ms"),
|
||||||
|
metric.WithDescription("Measures the duration of inbound HTTP requests."),
|
||||||
|
)
|
||||||
handleErr(err)
|
handleErr(err)
|
||||||
|
|
||||||
h.counters[RequestContentLength] = requestBytesCounter
|
|
||||||
h.counters[ResponseContentLength] = responseBytesCounter
|
|
||||||
h.valueRecorders[ServerLatency] = serverLatencyMeasure
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// serveHTTP sets up tracing and calls the given next http.Handler with the span
|
// serveHTTP sets up tracing and calls the given next http.Handler with the span
|
||||||
@ -224,13 +232,13 @@ func (h *middleware) serveHTTP(w http.ResponseWriter, r *http.Request, next http
|
|||||||
attributes = append(attributes, semconv.HTTPStatusCode(rww.statusCode))
|
attributes = append(attributes, semconv.HTTPStatusCode(rww.statusCode))
|
||||||
}
|
}
|
||||||
o := metric.WithAttributes(attributes...)
|
o := metric.WithAttributes(attributes...)
|
||||||
h.counters[RequestContentLength].Add(ctx, bw.read, o)
|
h.requestBytesCounter.Add(ctx, bw.read, o)
|
||||||
h.counters[ResponseContentLength].Add(ctx, rww.written, o)
|
h.responseBytesCounter.Add(ctx, rww.written, o)
|
||||||
|
|
||||||
// Use floating point division here for higher precision (instead of Millisecond method).
|
// Use floating point division here for higher precision (instead of Millisecond method).
|
||||||
elapsedTime := float64(time.Since(requestStartTime)) / float64(time.Millisecond)
|
elapsedTime := float64(time.Since(requestStartTime)) / float64(time.Millisecond)
|
||||||
|
|
||||||
h.valueRecorders[ServerLatency].Record(ctx, elapsedTime, o)
|
h.serverLatencyMeasure.Record(ctx, elapsedTime, o)
|
||||||
}
|
}
|
||||||
|
|
||||||
func setAfterServeAttributes(span trace.Span, read, wrote int64, statusCode int, rerr, werr error) {
|
func setAfterServeAttributes(span trace.Span, read, wrote int64, statusCode int, rerr, werr error) {
|
||||||
|
@ -24,7 +24,7 @@ import (
|
|||||||
|
|
||||||
"go.opentelemetry.io/otel/attribute"
|
"go.opentelemetry.io/otel/attribute"
|
||||||
"go.opentelemetry.io/otel/codes"
|
"go.opentelemetry.io/otel/codes"
|
||||||
semconv "go.opentelemetry.io/otel/semconv/v1.17.0"
|
semconv "go.opentelemetry.io/otel/semconv/v1.20.0"
|
||||||
)
|
)
|
||||||
|
|
||||||
// HTTPClientResponse returns trace attributes for an HTTP response received by a
|
// HTTPClientResponse returns trace attributes for an HTTP response received by a
|
||||||
@ -51,6 +51,14 @@ func HTTPClientRequest(req *http.Request) []attribute.KeyValue {
|
|||||||
return hc.ClientRequest(req)
|
return hc.ClientRequest(req)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// HTTPClientRequestMetrics returns metric attributes for an HTTP request made by a client.
|
||||||
|
// The following attributes are always returned: "http.method", "net.peer.name".
|
||||||
|
// The following attributes are returned if the
|
||||||
|
// related values are defined in req: "net.peer.port".
|
||||||
|
func HTTPClientRequestMetrics(req *http.Request) []attribute.KeyValue {
|
||||||
|
return hc.ClientRequestMetrics(req)
|
||||||
|
}
|
||||||
|
|
||||||
// HTTPClientStatus returns a span status code and message for an HTTP status code
|
// HTTPClientStatus returns a span status code and message for an HTTP status code
|
||||||
// value received by a client.
|
// value received by a client.
|
||||||
func HTTPClientStatus(code int) (codes.Code, string) {
|
func HTTPClientStatus(code int) (codes.Code, string) {
|
||||||
@ -114,44 +122,12 @@ func HTTPServerStatus(code int) (codes.Code, string) {
|
|||||||
return hc.ServerStatus(code)
|
return hc.ServerStatus(code)
|
||||||
}
|
}
|
||||||
|
|
||||||
// HTTPRequestHeader returns the contents of h as attributes.
|
|
||||||
//
|
|
||||||
// Instrumentation should require an explicit configuration of which headers to
|
|
||||||
// captured and then prune what they pass here. Including all headers can be a
|
|
||||||
// security risk - explicit configuration helps avoid leaking sensitive
|
|
||||||
// information.
|
|
||||||
//
|
|
||||||
// The User-Agent header is already captured in the http.user_agent attribute
|
|
||||||
// from ClientRequest and ServerRequest. Instrumentation may provide an option
|
|
||||||
// to capture that header here even though it is not recommended. Otherwise,
|
|
||||||
// instrumentation should filter that out of what is passed.
|
|
||||||
func HTTPRequestHeader(h http.Header) []attribute.KeyValue {
|
|
||||||
return hc.RequestHeader(h)
|
|
||||||
}
|
|
||||||
|
|
||||||
// HTTPResponseHeader returns the contents of h as attributes.
|
|
||||||
//
|
|
||||||
// Instrumentation should require an explicit configuration of which headers to
|
|
||||||
// captured and then prune what they pass here. Including all headers can be a
|
|
||||||
// security risk - explicit configuration helps avoid leaking sensitive
|
|
||||||
// information.
|
|
||||||
//
|
|
||||||
// The User-Agent header is already captured in the http.user_agent attribute
|
|
||||||
// from ClientRequest and ServerRequest. Instrumentation may provide an option
|
|
||||||
// to capture that header here even though it is not recommended. Otherwise,
|
|
||||||
// instrumentation should filter that out of what is passed.
|
|
||||||
func HTTPResponseHeader(h http.Header) []attribute.KeyValue {
|
|
||||||
return hc.ResponseHeader(h)
|
|
||||||
}
|
|
||||||
|
|
||||||
// httpConv are the HTTP semantic convention attributes defined for a version
|
// httpConv are the HTTP semantic convention attributes defined for a version
|
||||||
// of the OpenTelemetry specification.
|
// of the OpenTelemetry specification.
|
||||||
type httpConv struct {
|
type httpConv struct {
|
||||||
NetConv *netConv
|
NetConv *netConv
|
||||||
|
|
||||||
EnduserIDKey attribute.Key
|
|
||||||
HTTPClientIPKey attribute.Key
|
HTTPClientIPKey attribute.Key
|
||||||
HTTPFlavorKey attribute.Key
|
|
||||||
HTTPMethodKey attribute.Key
|
HTTPMethodKey attribute.Key
|
||||||
HTTPRequestContentLengthKey attribute.Key
|
HTTPRequestContentLengthKey attribute.Key
|
||||||
HTTPResponseContentLengthKey attribute.Key
|
HTTPResponseContentLengthKey attribute.Key
|
||||||
@ -161,15 +137,13 @@ type httpConv struct {
|
|||||||
HTTPStatusCodeKey attribute.Key
|
HTTPStatusCodeKey attribute.Key
|
||||||
HTTPTargetKey attribute.Key
|
HTTPTargetKey attribute.Key
|
||||||
HTTPURLKey attribute.Key
|
HTTPURLKey attribute.Key
|
||||||
HTTPUserAgentKey attribute.Key
|
UserAgentOriginalKey attribute.Key
|
||||||
}
|
}
|
||||||
|
|
||||||
var hc = &httpConv{
|
var hc = &httpConv{
|
||||||
NetConv: nc,
|
NetConv: nc,
|
||||||
|
|
||||||
EnduserIDKey: semconv.EnduserIDKey,
|
|
||||||
HTTPClientIPKey: semconv.HTTPClientIPKey,
|
HTTPClientIPKey: semconv.HTTPClientIPKey,
|
||||||
HTTPFlavorKey: semconv.HTTPFlavorKey,
|
|
||||||
HTTPMethodKey: semconv.HTTPMethodKey,
|
HTTPMethodKey: semconv.HTTPMethodKey,
|
||||||
HTTPRequestContentLengthKey: semconv.HTTPRequestContentLengthKey,
|
HTTPRequestContentLengthKey: semconv.HTTPRequestContentLengthKey,
|
||||||
HTTPResponseContentLengthKey: semconv.HTTPResponseContentLengthKey,
|
HTTPResponseContentLengthKey: semconv.HTTPResponseContentLengthKey,
|
||||||
@ -179,7 +153,7 @@ var hc = &httpConv{
|
|||||||
HTTPStatusCodeKey: semconv.HTTPStatusCodeKey,
|
HTTPStatusCodeKey: semconv.HTTPStatusCodeKey,
|
||||||
HTTPTargetKey: semconv.HTTPTargetKey,
|
HTTPTargetKey: semconv.HTTPTargetKey,
|
||||||
HTTPURLKey: semconv.HTTPURLKey,
|
HTTPURLKey: semconv.HTTPURLKey,
|
||||||
HTTPUserAgentKey: semconv.HTTPUserAgentKey,
|
UserAgentOriginalKey: semconv.UserAgentOriginalKey,
|
||||||
}
|
}
|
||||||
|
|
||||||
// ClientResponse returns attributes for an HTTP response received by a client
|
// ClientResponse returns attributes for an HTTP response received by a client
|
||||||
@ -193,6 +167,10 @@ var hc = &httpConv{
|
|||||||
//
|
//
|
||||||
// append(ClientResponse(resp), ClientRequest(resp.Request)...)
|
// append(ClientResponse(resp), ClientRequest(resp.Request)...)
|
||||||
func (c *httpConv) ClientResponse(resp *http.Response) []attribute.KeyValue {
|
func (c *httpConv) ClientResponse(resp *http.Response) []attribute.KeyValue {
|
||||||
|
/* The following semantic conventions are returned if present:
|
||||||
|
http.status_code int
|
||||||
|
http.response_content_length int
|
||||||
|
*/
|
||||||
var n int
|
var n int
|
||||||
if resp.StatusCode > 0 {
|
if resp.StatusCode > 0 {
|
||||||
n++
|
n++
|
||||||
@ -212,11 +190,31 @@ func (c *httpConv) ClientResponse(resp *http.Response) []attribute.KeyValue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ClientRequest returns attributes for an HTTP request made by a client. The
|
// ClientRequest returns attributes for an HTTP request made by a client. The
|
||||||
// following attributes are always returned: "http.url", "http.flavor",
|
// following attributes are always returned: "http.url", "http.method",
|
||||||
// "http.method", "net.peer.name". The following attributes are returned if the
|
// "net.peer.name". The following attributes are returned if the related values
|
||||||
// related values are defined in req: "net.peer.port", "http.user_agent",
|
// are defined in req: "net.peer.port", "http.user_agent",
|
||||||
// "http.request_content_length", "enduser.id".
|
// "http.request_content_length", "user_agent.original".
|
||||||
func (c *httpConv) ClientRequest(req *http.Request) []attribute.KeyValue {
|
func (c *httpConv) ClientRequest(req *http.Request) []attribute.KeyValue {
|
||||||
|
/* The following semantic conventions are returned if present:
|
||||||
|
http.method string
|
||||||
|
user_agent.original string
|
||||||
|
http.url string
|
||||||
|
net.peer.name string
|
||||||
|
net.peer.port int
|
||||||
|
http.request_content_length int
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* The following semantic conventions are not returned:
|
||||||
|
http.status_code This requires the response. See ClientResponse.
|
||||||
|
http.response_content_length This requires the response. See ClientResponse.
|
||||||
|
net.sock.family This requires the socket used.
|
||||||
|
net.sock.peer.addr This requires the socket used.
|
||||||
|
net.sock.peer.name This requires the socket used.
|
||||||
|
net.sock.peer.port This requires the socket used.
|
||||||
|
http.resend_count This is something outside of a single request.
|
||||||
|
net.protocol.name The value is the Request is ignored, and the go client will always use "http".
|
||||||
|
net.protocol.version The value in the Request is ignored, and the go client will always use 1.1 or 2.0.
|
||||||
|
*/
|
||||||
n := 3 // URL, peer name, proto, and method.
|
n := 3 // URL, peer name, proto, and method.
|
||||||
var h string
|
var h string
|
||||||
if req.URL != nil {
|
if req.URL != nil {
|
||||||
@ -234,14 +232,10 @@ func (c *httpConv) ClientRequest(req *http.Request) []attribute.KeyValue {
|
|||||||
if req.ContentLength > 0 {
|
if req.ContentLength > 0 {
|
||||||
n++
|
n++
|
||||||
}
|
}
|
||||||
userID, _, hasUserID := req.BasicAuth()
|
|
||||||
if hasUserID {
|
|
||||||
n++
|
|
||||||
}
|
|
||||||
attrs := make([]attribute.KeyValue, 0, n)
|
attrs := make([]attribute.KeyValue, 0, n)
|
||||||
|
|
||||||
attrs = append(attrs, c.method(req.Method))
|
attrs = append(attrs, c.method(req.Method))
|
||||||
attrs = append(attrs, c.flavor(req.Proto))
|
|
||||||
|
|
||||||
var u string
|
var u string
|
||||||
if req.URL != nil {
|
if req.URL != nil {
|
||||||
@ -260,15 +254,43 @@ func (c *httpConv) ClientRequest(req *http.Request) []attribute.KeyValue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if useragent != "" {
|
if useragent != "" {
|
||||||
attrs = append(attrs, c.HTTPUserAgentKey.String(useragent))
|
attrs = append(attrs, c.UserAgentOriginalKey.String(useragent))
|
||||||
}
|
}
|
||||||
|
|
||||||
if l := req.ContentLength; l > 0 {
|
if l := req.ContentLength; l > 0 {
|
||||||
attrs = append(attrs, c.HTTPRequestContentLengthKey.Int64(l))
|
attrs = append(attrs, c.HTTPRequestContentLengthKey.Int64(l))
|
||||||
}
|
}
|
||||||
|
|
||||||
if hasUserID {
|
return attrs
|
||||||
attrs = append(attrs, c.EnduserIDKey.String(userID))
|
}
|
||||||
|
|
||||||
|
// ClientRequestMetrics returns metric attributes for an HTTP request made by a client. The
|
||||||
|
// following attributes are always returned: "http.method", "net.peer.name".
|
||||||
|
// The following attributes are returned if the related values
|
||||||
|
// are defined in req: "net.peer.port".
|
||||||
|
func (c *httpConv) ClientRequestMetrics(req *http.Request) []attribute.KeyValue {
|
||||||
|
/* The following semantic conventions are returned if present:
|
||||||
|
http.method string
|
||||||
|
net.peer.name string
|
||||||
|
net.peer.port int
|
||||||
|
*/
|
||||||
|
|
||||||
|
n := 2 // method, peer name.
|
||||||
|
var h string
|
||||||
|
if req.URL != nil {
|
||||||
|
h = req.URL.Host
|
||||||
|
}
|
||||||
|
peer, p := firstHostPort(h, req.Header.Get("Host"))
|
||||||
|
port := requiredHTTPPort(req.URL != nil && req.URL.Scheme == "https", p)
|
||||||
|
if port > 0 {
|
||||||
|
n++
|
||||||
|
}
|
||||||
|
|
||||||
|
attrs := make([]attribute.KeyValue, 0, n)
|
||||||
|
attrs = append(attrs, c.method(req.Method), c.NetConv.PeerName(peer))
|
||||||
|
|
||||||
|
if port > 0 {
|
||||||
|
attrs = append(attrs, c.NetConv.PeerPort(port))
|
||||||
}
|
}
|
||||||
|
|
||||||
return attrs
|
return attrs
|
||||||
@ -291,18 +313,35 @@ func (c *httpConv) ClientRequest(req *http.Request) []attribute.KeyValue {
|
|||||||
// The req Host will be used to determine the server instead.
|
// The req Host will be used to determine the server instead.
|
||||||
//
|
//
|
||||||
// The following attributes are always returned: "http.method", "http.scheme",
|
// The following attributes are always returned: "http.method", "http.scheme",
|
||||||
// "http.flavor", "http.target", "net.host.name". The following attributes are
|
// "http.target", "net.host.name". The following attributes are returned if they
|
||||||
// returned if they related values are defined in req: "net.host.port",
|
// related values are defined in req: "net.host.port", "net.sock.peer.addr",
|
||||||
// "net.sock.peer.addr", "net.sock.peer.port", "http.user_agent", "enduser.id",
|
// "net.sock.peer.port", "user_agent.original", "http.client_ip",
|
||||||
// "http.client_ip".
|
// "net.protocol.name", "net.protocol.version".
|
||||||
func (c *httpConv) ServerRequest(server string, req *http.Request) []attribute.KeyValue {
|
func (c *httpConv) ServerRequest(server string, req *http.Request) []attribute.KeyValue {
|
||||||
// TODO: This currently does not add the specification required
|
/* The following semantic conventions are returned if present:
|
||||||
// `http.target` attribute. It has too high of a cardinality to safely be
|
http.method string
|
||||||
// added. An alternate should be added, or this comment removed, when it is
|
http.scheme string
|
||||||
// addressed by the specification. If it is ultimately decided to continue
|
net.host.name string
|
||||||
// not including the attribute, the HTTPTargetKey field of the httpConv
|
net.host.port int
|
||||||
// should be removed as well.
|
net.sock.peer.addr string
|
||||||
|
net.sock.peer.port int
|
||||||
|
user_agent.original string
|
||||||
|
http.client_ip string
|
||||||
|
net.protocol.name string Note: not set if the value is "http".
|
||||||
|
net.protocol.version string
|
||||||
|
http.target string Note: doesn't include the query parameter.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* The following semantic conventions are not returned:
|
||||||
|
http.status_code This requires the response.
|
||||||
|
http.request_content_length This requires the len() of body, which can mutate it.
|
||||||
|
http.response_content_length This requires the response.
|
||||||
|
http.route This is not available.
|
||||||
|
net.sock.peer.name This would require a DNS lookup.
|
||||||
|
net.sock.host.addr The request doesn't have access to the underlying socket.
|
||||||
|
net.sock.host.port The request doesn't have access to the underlying socket.
|
||||||
|
|
||||||
|
*/
|
||||||
n := 4 // Method, scheme, proto, and host name.
|
n := 4 // Method, scheme, proto, and host name.
|
||||||
var host string
|
var host string
|
||||||
var p int
|
var p int
|
||||||
@ -330,19 +369,31 @@ func (c *httpConv) ServerRequest(server string, req *http.Request) []attribute.K
|
|||||||
if useragent != "" {
|
if useragent != "" {
|
||||||
n++
|
n++
|
||||||
}
|
}
|
||||||
userID, _, hasUserID := req.BasicAuth()
|
|
||||||
if hasUserID {
|
|
||||||
n++
|
|
||||||
}
|
|
||||||
clientIP := serverClientIP(req.Header.Get("X-Forwarded-For"))
|
clientIP := serverClientIP(req.Header.Get("X-Forwarded-For"))
|
||||||
if clientIP != "" {
|
if clientIP != "" {
|
||||||
n++
|
n++
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var target string
|
||||||
|
if req.URL != nil {
|
||||||
|
target = req.URL.Path
|
||||||
|
if target != "" {
|
||||||
|
n++
|
||||||
|
}
|
||||||
|
}
|
||||||
|
protoName, protoVersion := netProtocol(req.Proto)
|
||||||
|
if protoName != "" && protoName != "http" {
|
||||||
|
n++
|
||||||
|
}
|
||||||
|
if protoVersion != "" {
|
||||||
|
n++
|
||||||
|
}
|
||||||
|
|
||||||
attrs := make([]attribute.KeyValue, 0, n)
|
attrs := make([]attribute.KeyValue, 0, n)
|
||||||
|
|
||||||
attrs = append(attrs, c.method(req.Method))
|
attrs = append(attrs, c.method(req.Method))
|
||||||
attrs = append(attrs, c.scheme(req.TLS != nil))
|
attrs = append(attrs, c.scheme(req.TLS != nil))
|
||||||
attrs = append(attrs, c.flavor(req.Proto))
|
|
||||||
attrs = append(attrs, c.NetConv.HostName(host))
|
attrs = append(attrs, c.NetConv.HostName(host))
|
||||||
|
|
||||||
if hostPort > 0 {
|
if hostPort > 0 {
|
||||||
@ -359,17 +410,24 @@ func (c *httpConv) ServerRequest(server string, req *http.Request) []attribute.K
|
|||||||
}
|
}
|
||||||
|
|
||||||
if useragent != "" {
|
if useragent != "" {
|
||||||
attrs = append(attrs, c.HTTPUserAgentKey.String(useragent))
|
attrs = append(attrs, c.UserAgentOriginalKey.String(useragent))
|
||||||
}
|
|
||||||
|
|
||||||
if hasUserID {
|
|
||||||
attrs = append(attrs, c.EnduserIDKey.String(userID))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if clientIP != "" {
|
if clientIP != "" {
|
||||||
attrs = append(attrs, c.HTTPClientIPKey.String(clientIP))
|
attrs = append(attrs, c.HTTPClientIPKey.String(clientIP))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if target != "" {
|
||||||
|
attrs = append(attrs, c.HTTPTargetKey.String(target))
|
||||||
|
}
|
||||||
|
|
||||||
|
if protoName != "" && protoName != "http" {
|
||||||
|
attrs = append(attrs, c.NetConv.NetProtocolName.String(protoName))
|
||||||
|
}
|
||||||
|
if protoVersion != "" {
|
||||||
|
attrs = append(attrs, c.NetConv.NetProtocolVersion.String(protoVersion))
|
||||||
|
}
|
||||||
|
|
||||||
return attrs
|
return attrs
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -394,14 +452,18 @@ func (c *httpConv) ServerRequest(server string, req *http.Request) []attribute.K
|
|||||||
// "http.flavor", "net.host.name". The following attributes are
|
// "http.flavor", "net.host.name". The following attributes are
|
||||||
// returned if they related values are defined in req: "net.host.port".
|
// returned if they related values are defined in req: "net.host.port".
|
||||||
func (c *httpConv) ServerRequestMetrics(server string, req *http.Request) []attribute.KeyValue {
|
func (c *httpConv) ServerRequestMetrics(server string, req *http.Request) []attribute.KeyValue {
|
||||||
// TODO: This currently does not add the specification required
|
/* The following semantic conventions are returned if present:
|
||||||
// `http.target` attribute. It has too high of a cardinality to safely be
|
http.scheme string
|
||||||
// added. An alternate should be added, or this comment removed, when it is
|
http.route string
|
||||||
// addressed by the specification. If it is ultimately decided to continue
|
http.method string
|
||||||
// not including the attribute, the HTTPTargetKey field of the httpConv
|
http.status_code int
|
||||||
// should be removed as well.
|
net.host.name string
|
||||||
|
net.host.port int
|
||||||
|
net.protocol.name string Note: not set if the value is "http".
|
||||||
|
net.protocol.version string
|
||||||
|
*/
|
||||||
|
|
||||||
n := 4 // Method, scheme, proto, and host name.
|
n := 3 // Method, scheme, and host name.
|
||||||
var host string
|
var host string
|
||||||
var p int
|
var p int
|
||||||
if server == "" {
|
if server == "" {
|
||||||
@ -417,16 +479,29 @@ func (c *httpConv) ServerRequestMetrics(server string, req *http.Request) []attr
|
|||||||
if hostPort > 0 {
|
if hostPort > 0 {
|
||||||
n++
|
n++
|
||||||
}
|
}
|
||||||
|
protoName, protoVersion := netProtocol(req.Proto)
|
||||||
|
if protoName != "" {
|
||||||
|
n++
|
||||||
|
}
|
||||||
|
if protoVersion != "" {
|
||||||
|
n++
|
||||||
|
}
|
||||||
|
|
||||||
attrs := make([]attribute.KeyValue, 0, n)
|
attrs := make([]attribute.KeyValue, 0, n)
|
||||||
|
|
||||||
attrs = append(attrs, c.methodMetric(req.Method))
|
attrs = append(attrs, c.methodMetric(req.Method))
|
||||||
attrs = append(attrs, c.scheme(req.TLS != nil))
|
attrs = append(attrs, c.scheme(req.TLS != nil))
|
||||||
attrs = append(attrs, c.flavor(req.Proto))
|
|
||||||
attrs = append(attrs, c.NetConv.HostName(host))
|
attrs = append(attrs, c.NetConv.HostName(host))
|
||||||
|
|
||||||
if hostPort > 0 {
|
if hostPort > 0 {
|
||||||
attrs = append(attrs, c.NetConv.HostPort(hostPort))
|
attrs = append(attrs, c.NetConv.HostPort(hostPort))
|
||||||
}
|
}
|
||||||
|
if protoName != "" {
|
||||||
|
attrs = append(attrs, c.NetConv.NetProtocolName.String(protoName))
|
||||||
|
}
|
||||||
|
if protoVersion != "" {
|
||||||
|
attrs = append(attrs, c.NetConv.NetProtocolVersion.String(protoVersion))
|
||||||
|
}
|
||||||
|
|
||||||
return attrs
|
return attrs
|
||||||
}
|
}
|
||||||
@ -455,21 +530,6 @@ func (c *httpConv) scheme(https bool) attribute.KeyValue { // nolint:revive
|
|||||||
return c.HTTPSchemeHTTP
|
return c.HTTPSchemeHTTP
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *httpConv) flavor(proto string) attribute.KeyValue {
|
|
||||||
switch proto {
|
|
||||||
case "HTTP/1.0":
|
|
||||||
return c.HTTPFlavorKey.String("1.0")
|
|
||||||
case "HTTP/1.1":
|
|
||||||
return c.HTTPFlavorKey.String("1.1")
|
|
||||||
case "HTTP/2":
|
|
||||||
return c.HTTPFlavorKey.String("2.0")
|
|
||||||
case "HTTP/3":
|
|
||||||
return c.HTTPFlavorKey.String("3.0")
|
|
||||||
default:
|
|
||||||
return c.HTTPFlavorKey.String(proto)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func serverClientIP(xForwardedFor string) string {
|
func serverClientIP(xForwardedFor string) string {
|
||||||
if idx := strings.Index(xForwardedFor, ","); idx >= 0 {
|
if idx := strings.Index(xForwardedFor, ","); idx >= 0 {
|
||||||
xForwardedFor = xForwardedFor[:idx]
|
xForwardedFor = xForwardedFor[:idx]
|
||||||
@ -501,31 +561,6 @@ func firstHostPort(source ...string) (host string, port int) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// RequestHeader returns the contents of h as OpenTelemetry attributes.
|
|
||||||
func (c *httpConv) RequestHeader(h http.Header) []attribute.KeyValue {
|
|
||||||
return c.header("http.request.header", h)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ResponseHeader returns the contents of h as OpenTelemetry attributes.
|
|
||||||
func (c *httpConv) ResponseHeader(h http.Header) []attribute.KeyValue {
|
|
||||||
return c.header("http.response.header", h)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *httpConv) header(prefix string, h http.Header) []attribute.KeyValue {
|
|
||||||
key := func(k string) attribute.Key {
|
|
||||||
k = strings.ToLower(k)
|
|
||||||
k = strings.ReplaceAll(k, "-", "_")
|
|
||||||
k = fmt.Sprintf("%s.%s", prefix, k)
|
|
||||||
return attribute.Key(k)
|
|
||||||
}
|
|
||||||
|
|
||||||
attrs := make([]attribute.KeyValue, 0, len(h))
|
|
||||||
for k, v := range h {
|
|
||||||
attrs = append(attrs, key(k).StringSlice(v))
|
|
||||||
}
|
|
||||||
return attrs
|
|
||||||
}
|
|
||||||
|
|
||||||
// ClientStatus returns a span status code and message for an HTTP status code
|
// ClientStatus returns a span status code and message for an HTTP status code
|
||||||
// value received by a client.
|
// value received by a client.
|
||||||
func (c *httpConv) ClientStatus(code int) (codes.Code, string) {
|
func (c *httpConv) ClientStatus(code int) (codes.Code, string) {
|
||||||
|
@ -22,7 +22,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"go.opentelemetry.io/otel/attribute"
|
"go.opentelemetry.io/otel/attribute"
|
||||||
semconv "go.opentelemetry.io/otel/semconv/v1.17.0"
|
semconv "go.opentelemetry.io/otel/semconv/v1.20.0"
|
||||||
)
|
)
|
||||||
|
|
||||||
// NetTransport returns a trace attribute describing the transport protocol of the
|
// NetTransport returns a trace attribute describing the transport protocol of the
|
||||||
@ -32,24 +32,6 @@ func NetTransport(network string) attribute.KeyValue {
|
|||||||
return nc.Transport(network)
|
return nc.Transport(network)
|
||||||
}
|
}
|
||||||
|
|
||||||
// NetClient returns trace attributes for a client network connection to address.
|
|
||||||
// See net.Dial for information about acceptable address values, address should
|
|
||||||
// be the same as the one used to create conn. If conn is nil, only network
|
|
||||||
// peer attributes will be returned that describe address. Otherwise, the
|
|
||||||
// socket level information about conn will also be included.
|
|
||||||
func NetClient(address string, conn net.Conn) []attribute.KeyValue {
|
|
||||||
return nc.Client(address, conn)
|
|
||||||
}
|
|
||||||
|
|
||||||
// NetServer returns trace attributes for a network listener listening at address.
|
|
||||||
// See net.Listen for information about acceptable address values, address
|
|
||||||
// should be the same as the one used to create ln. If ln is nil, only network
|
|
||||||
// host attributes will be returned that describe address. Otherwise, the
|
|
||||||
// socket level information about ln will also be included.
|
|
||||||
func NetServer(address string, ln net.Listener) []attribute.KeyValue {
|
|
||||||
return nc.Server(address, ln)
|
|
||||||
}
|
|
||||||
|
|
||||||
// netConv are the network semantic convention attributes defined for a version
|
// netConv are the network semantic convention attributes defined for a version
|
||||||
// of the OpenTelemetry specification.
|
// of the OpenTelemetry specification.
|
||||||
type netConv struct {
|
type netConv struct {
|
||||||
@ -57,6 +39,8 @@ type netConv struct {
|
|||||||
NetHostPortKey attribute.Key
|
NetHostPortKey attribute.Key
|
||||||
NetPeerNameKey attribute.Key
|
NetPeerNameKey attribute.Key
|
||||||
NetPeerPortKey attribute.Key
|
NetPeerPortKey attribute.Key
|
||||||
|
NetProtocolName attribute.Key
|
||||||
|
NetProtocolVersion attribute.Key
|
||||||
NetSockFamilyKey attribute.Key
|
NetSockFamilyKey attribute.Key
|
||||||
NetSockPeerAddrKey attribute.Key
|
NetSockPeerAddrKey attribute.Key
|
||||||
NetSockPeerPortKey attribute.Key
|
NetSockPeerPortKey attribute.Key
|
||||||
@ -73,6 +57,8 @@ var nc = &netConv{
|
|||||||
NetHostPortKey: semconv.NetHostPortKey,
|
NetHostPortKey: semconv.NetHostPortKey,
|
||||||
NetPeerNameKey: semconv.NetPeerNameKey,
|
NetPeerNameKey: semconv.NetPeerNameKey,
|
||||||
NetPeerPortKey: semconv.NetPeerPortKey,
|
NetPeerPortKey: semconv.NetPeerPortKey,
|
||||||
|
NetProtocolName: semconv.NetProtocolNameKey,
|
||||||
|
NetProtocolVersion: semconv.NetProtocolVersionKey,
|
||||||
NetSockFamilyKey: semconv.NetSockFamilyKey,
|
NetSockFamilyKey: semconv.NetSockFamilyKey,
|
||||||
NetSockPeerAddrKey: semconv.NetSockPeerAddrKey,
|
NetSockPeerAddrKey: semconv.NetSockPeerAddrKey,
|
||||||
NetSockPeerPortKey: semconv.NetSockPeerPortKey,
|
NetSockPeerPortKey: semconv.NetSockPeerPortKey,
|
||||||
@ -121,52 +107,6 @@ func (c *netConv) Host(address string) []attribute.KeyValue {
|
|||||||
return attrs
|
return attrs
|
||||||
}
|
}
|
||||||
|
|
||||||
// Server returns attributes for a network listener listening at address. See
|
|
||||||
// net.Listen for information about acceptable address values, address should
|
|
||||||
// be the same as the one used to create ln. If ln is nil, only network host
|
|
||||||
// attributes will be returned that describe address. Otherwise, the socket
|
|
||||||
// level information about ln will also be included.
|
|
||||||
func (c *netConv) Server(address string, ln net.Listener) []attribute.KeyValue {
|
|
||||||
if ln == nil {
|
|
||||||
return c.Host(address)
|
|
||||||
}
|
|
||||||
|
|
||||||
lAddr := ln.Addr()
|
|
||||||
if lAddr == nil {
|
|
||||||
return c.Host(address)
|
|
||||||
}
|
|
||||||
|
|
||||||
hostName, hostPort := splitHostPort(address)
|
|
||||||
sockHostAddr, sockHostPort := splitHostPort(lAddr.String())
|
|
||||||
network := lAddr.Network()
|
|
||||||
sockFamily := family(network, sockHostAddr)
|
|
||||||
|
|
||||||
n := nonZeroStr(hostName, network, sockHostAddr, sockFamily)
|
|
||||||
n += positiveInt(hostPort, sockHostPort)
|
|
||||||
attr := make([]attribute.KeyValue, 0, n)
|
|
||||||
if hostName != "" {
|
|
||||||
attr = append(attr, c.HostName(hostName))
|
|
||||||
if hostPort > 0 {
|
|
||||||
// Only if net.host.name is set should net.host.port be.
|
|
||||||
attr = append(attr, c.HostPort(hostPort))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if network != "" {
|
|
||||||
attr = append(attr, c.Transport(network))
|
|
||||||
}
|
|
||||||
if sockFamily != "" {
|
|
||||||
attr = append(attr, c.NetSockFamilyKey.String(sockFamily))
|
|
||||||
}
|
|
||||||
if sockHostAddr != "" {
|
|
||||||
attr = append(attr, c.NetSockHostAddrKey.String(sockHostAddr))
|
|
||||||
if sockHostPort > 0 {
|
|
||||||
// Only if net.sock.host.addr is set should net.sock.host.port be.
|
|
||||||
attr = append(attr, c.NetSockHostPortKey.Int(sockHostPort))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return attr
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *netConv) HostName(name string) attribute.KeyValue {
|
func (c *netConv) HostName(name string) attribute.KeyValue {
|
||||||
return c.NetHostNameKey.String(name)
|
return c.NetHostNameKey.String(name)
|
||||||
}
|
}
|
||||||
@ -175,85 +115,6 @@ func (c *netConv) HostPort(port int) attribute.KeyValue {
|
|||||||
return c.NetHostPortKey.Int(port)
|
return c.NetHostPortKey.Int(port)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Client returns attributes for a client network connection to address. See
|
|
||||||
// net.Dial for information about acceptable address values, address should be
|
|
||||||
// the same as the one used to create conn. If conn is nil, only network peer
|
|
||||||
// attributes will be returned that describe address. Otherwise, the socket
|
|
||||||
// level information about conn will also be included.
|
|
||||||
func (c *netConv) Client(address string, conn net.Conn) []attribute.KeyValue {
|
|
||||||
if conn == nil {
|
|
||||||
return c.Peer(address)
|
|
||||||
}
|
|
||||||
|
|
||||||
lAddr, rAddr := conn.LocalAddr(), conn.RemoteAddr()
|
|
||||||
|
|
||||||
var network string
|
|
||||||
switch {
|
|
||||||
case lAddr != nil:
|
|
||||||
network = lAddr.Network()
|
|
||||||
case rAddr != nil:
|
|
||||||
network = rAddr.Network()
|
|
||||||
default:
|
|
||||||
return c.Peer(address)
|
|
||||||
}
|
|
||||||
|
|
||||||
peerName, peerPort := splitHostPort(address)
|
|
||||||
var (
|
|
||||||
sockFamily string
|
|
||||||
sockPeerAddr string
|
|
||||||
sockPeerPort int
|
|
||||||
sockHostAddr string
|
|
||||||
sockHostPort int
|
|
||||||
)
|
|
||||||
|
|
||||||
if lAddr != nil {
|
|
||||||
sockHostAddr, sockHostPort = splitHostPort(lAddr.String())
|
|
||||||
}
|
|
||||||
|
|
||||||
if rAddr != nil {
|
|
||||||
sockPeerAddr, sockPeerPort = splitHostPort(rAddr.String())
|
|
||||||
}
|
|
||||||
|
|
||||||
switch {
|
|
||||||
case sockHostAddr != "":
|
|
||||||
sockFamily = family(network, sockHostAddr)
|
|
||||||
case sockPeerAddr != "":
|
|
||||||
sockFamily = family(network, sockPeerAddr)
|
|
||||||
}
|
|
||||||
|
|
||||||
n := nonZeroStr(peerName, network, sockPeerAddr, sockHostAddr, sockFamily)
|
|
||||||
n += positiveInt(peerPort, sockPeerPort, sockHostPort)
|
|
||||||
attr := make([]attribute.KeyValue, 0, n)
|
|
||||||
if peerName != "" {
|
|
||||||
attr = append(attr, c.PeerName(peerName))
|
|
||||||
if peerPort > 0 {
|
|
||||||
// Only if net.peer.name is set should net.peer.port be.
|
|
||||||
attr = append(attr, c.PeerPort(peerPort))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if network != "" {
|
|
||||||
attr = append(attr, c.Transport(network))
|
|
||||||
}
|
|
||||||
if sockFamily != "" {
|
|
||||||
attr = append(attr, c.NetSockFamilyKey.String(sockFamily))
|
|
||||||
}
|
|
||||||
if sockPeerAddr != "" {
|
|
||||||
attr = append(attr, c.NetSockPeerAddrKey.String(sockPeerAddr))
|
|
||||||
if sockPeerPort > 0 {
|
|
||||||
// Only if net.sock.peer.addr is set should net.sock.peer.port be.
|
|
||||||
attr = append(attr, c.NetSockPeerPortKey.Int(sockPeerPort))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if sockHostAddr != "" {
|
|
||||||
attr = append(attr, c.NetSockHostAddrKey.String(sockHostAddr))
|
|
||||||
if sockHostPort > 0 {
|
|
||||||
// Only if net.sock.host.addr is set should net.sock.host.port be.
|
|
||||||
attr = append(attr, c.NetSockHostPortKey.Int(sockHostPort))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return attr
|
|
||||||
}
|
|
||||||
|
|
||||||
func family(network, address string) string {
|
func family(network, address string) string {
|
||||||
switch network {
|
switch network {
|
||||||
case "unix", "unixgram", "unixpacket":
|
case "unix", "unixgram", "unixpacket":
|
||||||
@ -269,26 +130,6 @@ func family(network, address string) string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
func nonZeroStr(strs ...string) int {
|
|
||||||
var n int
|
|
||||||
for _, str := range strs {
|
|
||||||
if str != "" {
|
|
||||||
n++
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return n
|
|
||||||
}
|
|
||||||
|
|
||||||
func positiveInt(ints ...int) int {
|
|
||||||
var n int
|
|
||||||
for _, i := range ints {
|
|
||||||
if i > 0 {
|
|
||||||
n++
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return n
|
|
||||||
}
|
|
||||||
|
|
||||||
// Peer returns attributes for a network peer address.
|
// Peer returns attributes for a network peer address.
|
||||||
func (c *netConv) Peer(address string) []attribute.KeyValue {
|
func (c *netConv) Peer(address string) []attribute.KeyValue {
|
||||||
h, p := splitHostPort(address)
|
h, p := splitHostPort(address)
|
||||||
@ -366,3 +207,9 @@ func splitHostPort(hostport string) (host string, port int) {
|
|||||||
}
|
}
|
||||||
return host, int(p)
|
return host, int(p)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func netProtocol(proto string) (name string, version string) {
|
||||||
|
name, version, _ = strings.Cut(proto, "/")
|
||||||
|
name = strings.ToLower(name)
|
||||||
|
return name, version
|
||||||
|
}
|
||||||
|
109
vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/transport.go
generated
vendored
109
vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/transport.go
generated
vendored
@ -19,31 +19,43 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/http/httptrace"
|
"net/http/httptrace"
|
||||||
|
"sync/atomic"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"go.opentelemetry.io/otel/metric"
|
||||||
|
|
||||||
"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil"
|
"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil"
|
||||||
"go.opentelemetry.io/otel"
|
"go.opentelemetry.io/otel"
|
||||||
"go.opentelemetry.io/otel/codes"
|
"go.opentelemetry.io/otel/codes"
|
||||||
"go.opentelemetry.io/otel/propagation"
|
"go.opentelemetry.io/otel/propagation"
|
||||||
"go.opentelemetry.io/otel/trace"
|
"go.opentelemetry.io/otel/trace"
|
||||||
|
|
||||||
|
semconv "go.opentelemetry.io/otel/semconv/v1.20.0"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Transport implements the http.RoundTripper interface and wraps
|
// Transport implements the http.RoundTripper interface and wraps
|
||||||
// outbound HTTP(S) requests with a span.
|
// outbound HTTP(S) requests with a span and enriches it with metrics.
|
||||||
type Transport struct {
|
type Transport struct {
|
||||||
rt http.RoundTripper
|
rt http.RoundTripper
|
||||||
|
|
||||||
tracer trace.Tracer
|
tracer trace.Tracer
|
||||||
|
meter metric.Meter
|
||||||
propagators propagation.TextMapPropagator
|
propagators propagation.TextMapPropagator
|
||||||
spanStartOptions []trace.SpanStartOption
|
spanStartOptions []trace.SpanStartOption
|
||||||
filters []Filter
|
filters []Filter
|
||||||
spanNameFormatter func(string, *http.Request) string
|
spanNameFormatter func(string, *http.Request) string
|
||||||
clientTrace func(context.Context) *httptrace.ClientTrace
|
clientTrace func(context.Context) *httptrace.ClientTrace
|
||||||
|
|
||||||
|
requestBytesCounter metric.Int64Counter
|
||||||
|
responseBytesCounter metric.Int64Counter
|
||||||
|
latencyMeasure metric.Float64Histogram
|
||||||
}
|
}
|
||||||
|
|
||||||
var _ http.RoundTripper = &Transport{}
|
var _ http.RoundTripper = &Transport{}
|
||||||
|
|
||||||
// NewTransport wraps the provided http.RoundTripper with one that
|
// NewTransport wraps the provided http.RoundTripper with one that
|
||||||
// starts a span and injects the span context into the outbound request headers.
|
// starts a span, injects the span context into the outbound request headers,
|
||||||
|
// and enriches it with metrics.
|
||||||
//
|
//
|
||||||
// If the provided http.RoundTripper is nil, http.DefaultTransport will be used
|
// If the provided http.RoundTripper is nil, http.DefaultTransport will be used
|
||||||
// as the base http.RoundTripper.
|
// as the base http.RoundTripper.
|
||||||
@ -63,12 +75,14 @@ func NewTransport(base http.RoundTripper, opts ...Option) *Transport {
|
|||||||
|
|
||||||
c := newConfig(append(defaultOpts, opts...)...)
|
c := newConfig(append(defaultOpts, opts...)...)
|
||||||
t.applyConfig(c)
|
t.applyConfig(c)
|
||||||
|
t.createMeasures()
|
||||||
|
|
||||||
return &t
|
return &t
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *Transport) applyConfig(c *config) {
|
func (t *Transport) applyConfig(c *config) {
|
||||||
t.tracer = c.Tracer
|
t.tracer = c.Tracer
|
||||||
|
t.meter = c.Meter
|
||||||
t.propagators = c.Propagators
|
t.propagators = c.Propagators
|
||||||
t.spanStartOptions = c.SpanStartOptions
|
t.spanStartOptions = c.SpanStartOptions
|
||||||
t.filters = c.Filters
|
t.filters = c.Filters
|
||||||
@ -76,6 +90,30 @@ func (t *Transport) applyConfig(c *config) {
|
|||||||
t.clientTrace = c.ClientTrace
|
t.clientTrace = c.ClientTrace
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (t *Transport) createMeasures() {
|
||||||
|
var err error
|
||||||
|
t.requestBytesCounter, err = t.meter.Int64Counter(
|
||||||
|
clientRequestSize,
|
||||||
|
metric.WithUnit("By"),
|
||||||
|
metric.WithDescription("Measures the size of HTTP request messages."),
|
||||||
|
)
|
||||||
|
handleErr(err)
|
||||||
|
|
||||||
|
t.responseBytesCounter, err = t.meter.Int64Counter(
|
||||||
|
clientResponseSize,
|
||||||
|
metric.WithUnit("By"),
|
||||||
|
metric.WithDescription("Measures the size of HTTP response messages."),
|
||||||
|
)
|
||||||
|
handleErr(err)
|
||||||
|
|
||||||
|
t.latencyMeasure, err = t.meter.Float64Histogram(
|
||||||
|
clientDuration,
|
||||||
|
metric.WithUnit("ms"),
|
||||||
|
metric.WithDescription("Measures the duration of outbound HTTP requests."),
|
||||||
|
)
|
||||||
|
handleErr(err)
|
||||||
|
}
|
||||||
|
|
||||||
func defaultTransportFormatter(_ string, r *http.Request) string {
|
func defaultTransportFormatter(_ string, r *http.Request) string {
|
||||||
return "HTTP " + r.Method
|
return "HTTP " + r.Method
|
||||||
}
|
}
|
||||||
@ -84,6 +122,7 @@ func defaultTransportFormatter(_ string, r *http.Request) string {
|
|||||||
// before handing the request to the configured base RoundTripper. The created span will
|
// before handing the request to the configured base RoundTripper. The created span will
|
||||||
// end when the response body is closed or when a read from the body returns io.EOF.
|
// end when the response body is closed or when a read from the body returns io.EOF.
|
||||||
func (t *Transport) RoundTrip(r *http.Request) (*http.Response, error) {
|
func (t *Transport) RoundTrip(r *http.Request) (*http.Response, error) {
|
||||||
|
requestStartTime := time.Now()
|
||||||
for _, f := range t.filters {
|
for _, f := range t.filters {
|
||||||
if !f(r) {
|
if !f(r) {
|
||||||
// Simply pass through to the base RoundTripper if a filter rejects the request
|
// Simply pass through to the base RoundTripper if a filter rejects the request
|
||||||
@ -109,7 +148,23 @@ func (t *Transport) RoundTrip(r *http.Request) (*http.Response, error) {
|
|||||||
ctx = httptrace.WithClientTrace(ctx, t.clientTrace(ctx))
|
ctx = httptrace.WithClientTrace(ctx, t.clientTrace(ctx))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
labeler := &Labeler{}
|
||||||
|
ctx = injectLabeler(ctx, labeler)
|
||||||
|
|
||||||
r = r.Clone(ctx) // According to RoundTripper spec, we shouldn't modify the origin request.
|
r = r.Clone(ctx) // According to RoundTripper spec, we shouldn't modify the origin request.
|
||||||
|
|
||||||
|
// use a body wrapper to determine the request size
|
||||||
|
var bw bodyWrapper
|
||||||
|
// if request body is nil or NoBody, we don't want to mutate the body as it
|
||||||
|
// will affect the identity of it in an unforeseeable way because we assert
|
||||||
|
// ReadCloser fulfills a certain interface and it is indeed nil or NoBody.
|
||||||
|
if r.Body != nil && r.Body != http.NoBody {
|
||||||
|
bw.ReadCloser = r.Body
|
||||||
|
// noop to prevent nil panic. not using this record fun yet.
|
||||||
|
bw.record = func(int64) {}
|
||||||
|
r.Body = &bw
|
||||||
|
}
|
||||||
|
|
||||||
span.SetAttributes(semconvutil.HTTPClientRequest(r)...)
|
span.SetAttributes(semconvutil.HTTPClientRequest(r)...)
|
||||||
t.propagators.Inject(ctx, propagation.HeaderCarrier(r.Header))
|
t.propagators.Inject(ctx, propagation.HeaderCarrier(r.Header))
|
||||||
|
|
||||||
@ -121,9 +176,28 @@ func (t *Transport) RoundTrip(r *http.Request) (*http.Response, error) {
|
|||||||
return res, err
|
return res, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// metrics
|
||||||
|
metricAttrs := append(labeler.Get(), semconvutil.HTTPClientRequestMetrics(r)...)
|
||||||
|
if res.StatusCode > 0 {
|
||||||
|
metricAttrs = append(metricAttrs, semconv.HTTPStatusCode(res.StatusCode))
|
||||||
|
}
|
||||||
|
o := metric.WithAttributes(metricAttrs...)
|
||||||
|
t.requestBytesCounter.Add(ctx, bw.read, o)
|
||||||
|
// For handling response bytes we leverage a callback when the client reads the http response
|
||||||
|
readRecordFunc := func(n int64) {
|
||||||
|
t.responseBytesCounter.Add(ctx, n, o)
|
||||||
|
}
|
||||||
|
|
||||||
|
// traces
|
||||||
span.SetAttributes(semconvutil.HTTPClientResponse(res)...)
|
span.SetAttributes(semconvutil.HTTPClientResponse(res)...)
|
||||||
span.SetStatus(semconvutil.HTTPClientStatus(res.StatusCode))
|
span.SetStatus(semconvutil.HTTPClientStatus(res.StatusCode))
|
||||||
res.Body = newWrappedBody(span, res.Body)
|
|
||||||
|
res.Body = newWrappedBody(span, readRecordFunc, res.Body)
|
||||||
|
|
||||||
|
// Use floating point division here for higher precision (instead of Millisecond method).
|
||||||
|
elapsedTime := float64(time.Since(requestStartTime)) / float64(time.Millisecond)
|
||||||
|
|
||||||
|
t.latencyMeasure.Record(ctx, elapsedTime, o)
|
||||||
|
|
||||||
return res, err
|
return res, err
|
||||||
}
|
}
|
||||||
@ -131,17 +205,17 @@ func (t *Transport) RoundTrip(r *http.Request) (*http.Response, error) {
|
|||||||
// newWrappedBody returns a new and appropriately scoped *wrappedBody as an
|
// newWrappedBody returns a new and appropriately scoped *wrappedBody as an
|
||||||
// io.ReadCloser. If the passed body implements io.Writer, the returned value
|
// io.ReadCloser. If the passed body implements io.Writer, the returned value
|
||||||
// will implement io.ReadWriteCloser.
|
// will implement io.ReadWriteCloser.
|
||||||
func newWrappedBody(span trace.Span, body io.ReadCloser) io.ReadCloser {
|
func newWrappedBody(span trace.Span, record func(n int64), body io.ReadCloser) io.ReadCloser {
|
||||||
// The successful protocol switch responses will have a body that
|
// The successful protocol switch responses will have a body that
|
||||||
// implement an io.ReadWriteCloser. Ensure this interface type continues
|
// implement an io.ReadWriteCloser. Ensure this interface type continues
|
||||||
// to be satisfied if that is the case.
|
// to be satisfied if that is the case.
|
||||||
if _, ok := body.(io.ReadWriteCloser); ok {
|
if _, ok := body.(io.ReadWriteCloser); ok {
|
||||||
return &wrappedBody{span: span, body: body}
|
return &wrappedBody{span: span, record: record, body: body}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove the implementation of the io.ReadWriteCloser and only implement
|
// Remove the implementation of the io.ReadWriteCloser and only implement
|
||||||
// the io.ReadCloser.
|
// the io.ReadCloser.
|
||||||
return struct{ io.ReadCloser }{&wrappedBody{span: span, body: body}}
|
return struct{ io.ReadCloser }{&wrappedBody{span: span, record: record, body: body}}
|
||||||
}
|
}
|
||||||
|
|
||||||
// wrappedBody is the response body type returned by the transport
|
// wrappedBody is the response body type returned by the transport
|
||||||
@ -153,8 +227,11 @@ func newWrappedBody(span trace.Span, body io.ReadCloser) io.ReadCloser {
|
|||||||
// If the response body implements the io.Writer interface (i.e. for
|
// If the response body implements the io.Writer interface (i.e. for
|
||||||
// successful protocol switches), the wrapped body also will.
|
// successful protocol switches), the wrapped body also will.
|
||||||
type wrappedBody struct {
|
type wrappedBody struct {
|
||||||
span trace.Span
|
span trace.Span
|
||||||
body io.ReadCloser
|
recorded atomic.Bool
|
||||||
|
record func(n int64)
|
||||||
|
body io.ReadCloser
|
||||||
|
read atomic.Int64
|
||||||
}
|
}
|
||||||
|
|
||||||
var _ io.ReadWriteCloser = &wrappedBody{}
|
var _ io.ReadWriteCloser = &wrappedBody{}
|
||||||
@ -171,11 +248,14 @@ func (wb *wrappedBody) Write(p []byte) (int, error) {
|
|||||||
|
|
||||||
func (wb *wrappedBody) Read(b []byte) (int, error) {
|
func (wb *wrappedBody) Read(b []byte) (int, error) {
|
||||||
n, err := wb.body.Read(b)
|
n, err := wb.body.Read(b)
|
||||||
|
// Record the number of bytes read
|
||||||
|
wb.read.Add(int64(n))
|
||||||
|
|
||||||
switch err {
|
switch err {
|
||||||
case nil:
|
case nil:
|
||||||
// nothing to do here but fall through to the return
|
// nothing to do here but fall through to the return
|
||||||
case io.EOF:
|
case io.EOF:
|
||||||
|
wb.recordBytesRead()
|
||||||
wb.span.End()
|
wb.span.End()
|
||||||
default:
|
default:
|
||||||
wb.span.RecordError(err)
|
wb.span.RecordError(err)
|
||||||
@ -184,7 +264,20 @@ func (wb *wrappedBody) Read(b []byte) (int, error) {
|
|||||||
return n, err
|
return n, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// recordBytesRead is a function that ensures the number of bytes read is recorded once and only once.
|
||||||
|
func (wb *wrappedBody) recordBytesRead() {
|
||||||
|
// note: it is more performant (and equally correct) to use atomic.Bool over sync.Once here. In the event that
|
||||||
|
// two goroutines are racing to call this method, the number of bytes read will no longer increase. Using
|
||||||
|
// CompareAndSwap allows later goroutines to return quickly and not block waiting for the race winner to finish
|
||||||
|
// calling wb.record(wb.read.Load()).
|
||||||
|
if wb.recorded.CompareAndSwap(false, true) {
|
||||||
|
// Record the total number of bytes read
|
||||||
|
wb.record(wb.read.Load())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func (wb *wrappedBody) Close() error {
|
func (wb *wrappedBody) Close() error {
|
||||||
|
wb.recordBytesRead()
|
||||||
wb.span.End()
|
wb.span.End()
|
||||||
if wb.body != nil {
|
if wb.body != nil {
|
||||||
return wb.body.Close()
|
return wb.body.Close()
|
||||||
|
2
vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/version.go
generated
vendored
2
vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/version.go
generated
vendored
@ -16,7 +16,7 @@ package otelhttp // import "go.opentelemetry.io/contrib/instrumentation/net/http
|
|||||||
|
|
||||||
// Version is the current release version of the otelhttp instrumentation.
|
// Version is the current release version of the otelhttp instrumentation.
|
||||||
func Version() string {
|
func Version() string {
|
||||||
return "0.45.0"
|
return "0.48.0"
|
||||||
// This string is updated by the pre_release.sh script during release
|
// This string is updated by the pre_release.sh script during release
|
||||||
}
|
}
|
||||||
|
|
||||||
|
100
vendor/go.opentelemetry.io/otel/CHANGELOG.md
generated
vendored
100
vendor/go.opentelemetry.io/otel/CHANGELOG.md
generated
vendored
@ -8,6 +8,100 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
## [1.23.1] 2024-02-07
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Register all callbacks passed during observable instrument creation instead of just the last one multiple times in `go.opentelemetry.io/otel/sdk/metric`. (#4888)
|
||||||
|
|
||||||
|
## [1.23.0] 2024-02-06
|
||||||
|
|
||||||
|
This release contains the first stable, `v1`, release of the following modules:
|
||||||
|
|
||||||
|
- `go.opentelemetry.io/otel/bridge/opencensus`
|
||||||
|
- `go.opentelemetry.io/otel/bridge/opencensus/test`
|
||||||
|
- `go.opentelemetry.io/otel/example/opencensus`
|
||||||
|
- `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`
|
||||||
|
- `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`
|
||||||
|
- `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric`
|
||||||
|
|
||||||
|
See our [versioning policy](VERSIONING.md) for more information about these stability guarantees.
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Add `WithEndpointURL` option to the `exporters/otlp/otlpmetric/otlpmetricgrpc`, `exporters/otlp/otlpmetric/otlpmetrichttp`, `exporters/otlp/otlptrace/otlptracegrpc` and `exporters/otlp/otlptrace/otlptracehttp` packages. (#4808)
|
||||||
|
- Experimental exemplar exporting is added to the metric SDK.
|
||||||
|
See [metric documentation](./sdk/metric/EXPERIMENTAL.md#exemplars) for more information about this feature and how to enable it. (#4871)
|
||||||
|
- `ErrSchemaURLConflict` is added to `go.opentelemetry.io/otel/sdk/resource`.
|
||||||
|
This error is returned when a merge of two `Resource`s with different (non-empty) schema URL is attempted. (#4876)
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- The `Merge` and `New` functions in `go.opentelemetry.io/otel/sdk/resource` now returns a partial result if there is a schema URL merge conflict.
|
||||||
|
Instead of returning `nil` when two `Resource`s with different (non-empty) schema URLs are merged the merged `Resource`, along with the new `ErrSchemaURLConflict` error, is returned.
|
||||||
|
It is up to the user to decide if they want to use the returned `Resource` or not.
|
||||||
|
It may have desired attributes overwritten or include stale semantic conventions. (#4876)
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fix `ContainerID` resource detection on systemd when cgroup path has a colon. (#4449)
|
||||||
|
- Fix `go.opentelemetry.io/otel/sdk/metric` to cache instruments to avoid leaking memory when the same instrument is created multiple times. (#4820)
|
||||||
|
- Fix missing `Mix` and `Max` values for `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric` by introducing `MarshalText` and `MarshalJSON` for the `Extrema` type in `go.opentelemetry.io/sdk/metric/metricdata`. (#4827)
|
||||||
|
|
||||||
|
## [1.23.0-rc.1] 2024-01-18
|
||||||
|
|
||||||
|
This is a release candidate for the v1.23.0 release.
|
||||||
|
That release is expected to include the `v1` release of the following modules:
|
||||||
|
|
||||||
|
- `go.opentelemetry.io/otel/bridge/opencensus`
|
||||||
|
- `go.opentelemetry.io/otel/bridge/opencensus/test`
|
||||||
|
- `go.opentelemetry.io/otel/example/opencensus`
|
||||||
|
- `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`
|
||||||
|
- `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`
|
||||||
|
- `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric`
|
||||||
|
|
||||||
|
See our [versioning policy](VERSIONING.md) for more information about these stability guarantees.
|
||||||
|
|
||||||
|
## [1.22.0/0.45.0] 2024-01-17
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- The `go.opentelemetry.io/otel/semconv/v1.22.0` package.
|
||||||
|
The package contains semantic conventions from the `v1.22.0` version of the OpenTelemetry Semantic Conventions. (#4735)
|
||||||
|
- The `go.opentelemetry.io/otel/semconv/v1.23.0` package.
|
||||||
|
The package contains semantic conventions from the `v1.23.0` version of the OpenTelemetry Semantic Conventions. (#4746)
|
||||||
|
- The `go.opentelemetry.io/otel/semconv/v1.23.1` package.
|
||||||
|
The package contains semantic conventions from the `v1.23.1` version of the OpenTelemetry Semantic Conventions. (#4749)
|
||||||
|
- The `go.opentelemetry.io/otel/semconv/v1.24.0` package.
|
||||||
|
The package contains semantic conventions from the `v1.24.0` version of the OpenTelemetry Semantic Conventions. (#4770)
|
||||||
|
- Add `WithResourceAsConstantLabels` option to apply resource attributes for every metric emitted by the Prometheus exporter. (#4733)
|
||||||
|
- Experimental cardinality limiting is added to the metric SDK.
|
||||||
|
See [metric documentation](./sdk/metric/EXPERIMENTAL.md#cardinality-limit) for more information about this feature and how to enable it. (#4457)
|
||||||
|
- Add `NewMemberRaw` and `NewKeyValuePropertyRaw` in `go.opentelemetry.io/otel/baggage`. (#4804)
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Upgrade all use of `go.opentelemetry.io/otel/semconv` to use `v1.24.0`. (#4754)
|
||||||
|
- Update transformations in `go.opentelemetry.io/otel/exporters/zipkin` to follow `v1.24.0` version of the OpenTelemetry specification. (#4754)
|
||||||
|
- Record synchronous measurements when the passed context is canceled instead of dropping in `go.opentelemetry.io/otel/sdk/metric`.
|
||||||
|
If you do not want to make a measurement when the context is cancelled, you need to handle it yourself (e.g `if ctx.Err() != nil`). (#4671)
|
||||||
|
- Improve `go.opentelemetry.io/otel/trace.TraceState`'s performance. (#4722)
|
||||||
|
- Improve `go.opentelemetry.io/otel/propagation.TraceContext`'s performance. (#4721)
|
||||||
|
- Improve `go.opentelemetry.io/otel/baggage` performance. (#4743)
|
||||||
|
- Improve performance of the `(*Set).Filter` method in `go.opentelemetry.io/otel/attribute` when the passed filter does not filter out any attributes from the set. (#4774)
|
||||||
|
- `Member.String` in `go.opentelemetry.io/otel/baggage` percent-encodes only when necessary. (#4775)
|
||||||
|
- Improve `go.opentelemetry.io/otel/trace.Span`'s performance when adding multiple attributes. (#4818)
|
||||||
|
- `Property.Value` in `go.opentelemetry.io/otel/baggage` now returns a raw string instead of a percent-encoded value. (#4804)
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fix `Parse` in `go.opentelemetry.io/otel/baggage` to validate member value before percent-decoding. (#4755)
|
||||||
|
- Fix whitespace encoding of `Member.String` in `go.opentelemetry.io/otel/baggage`. (#4756)
|
||||||
|
- Fix observable not registered error when the asynchronous instrument has a drop aggregation in `go.opentelemetry.io/otel/sdk/metric`. (#4772)
|
||||||
|
- Fix baggage item key so that it is not canonicalized in `go.opentelemetry.io/otel/bridge/opentracing`. (#4776)
|
||||||
|
- Fix `go.opentelemetry.io/otel/bridge/opentracing` to properly handle baggage values that requires escaping during propagation. (#4804)
|
||||||
|
- Fix a bug where using multiple readers resulted in incorrect asynchronous counter values in `go.opentelemetry.io/otel/sdk/metric`. (#4742)
|
||||||
|
|
||||||
## [1.21.0/0.44.0] 2023-11-16
|
## [1.21.0/0.44.0] 2023-11-16
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
@ -2735,7 +2829,11 @@ It contains api and sdk for trace and meter.
|
|||||||
- CircleCI build CI manifest files.
|
- CircleCI build CI manifest files.
|
||||||
- CODEOWNERS file to track owners of this project.
|
- CODEOWNERS file to track owners of this project.
|
||||||
|
|
||||||
[Unreleased]: https://github.com/open-telemetry/opentelemetry-go/compare/v1.21.0...HEAD
|
[Unreleased]: https://github.com/open-telemetry/opentelemetry-go/compare/v1.23.1...HEAD
|
||||||
|
[1.23.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.23.1
|
||||||
|
[1.23.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.23.0
|
||||||
|
[1.23.0-rc.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.23.0-rc.1
|
||||||
|
[1.22.0/0.45.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.22.0
|
||||||
[1.21.0/0.44.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.21.0
|
[1.21.0/0.44.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.21.0
|
||||||
[1.20.0/0.43.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.20.0
|
[1.20.0/0.43.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.20.0
|
||||||
[1.19.0/0.42.0/0.0.7]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.19.0
|
[1.19.0/0.42.0/0.0.7]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.19.0
|
||||||
|
2
vendor/go.opentelemetry.io/otel/CODEOWNERS
generated
vendored
2
vendor/go.opentelemetry.io/otel/CODEOWNERS
generated
vendored
@ -14,4 +14,4 @@
|
|||||||
|
|
||||||
* @MrAlias @Aneurysm9 @evantorrie @XSAM @dashpole @MadVikingGod @pellared @hanyuancheung @dmathieu
|
* @MrAlias @Aneurysm9 @evantorrie @XSAM @dashpole @MadVikingGod @pellared @hanyuancheung @dmathieu
|
||||||
|
|
||||||
CODEOWNERS @MrAlias @MadVikingGod @pellared
|
CODEOWNERS @MrAlias @MadVikingGod @pellared @dashpole
|
23
vendor/go.opentelemetry.io/otel/CONTRIBUTING.md
generated
vendored
23
vendor/go.opentelemetry.io/otel/CONTRIBUTING.md
generated
vendored
@ -591,25 +591,46 @@ this.
|
|||||||
|
|
||||||
[^3]: https://github.com/open-telemetry/opentelemetry-go/issues/3548
|
[^3]: https://github.com/open-telemetry/opentelemetry-go/issues/3548
|
||||||
|
|
||||||
|
### Ignoring context cancellation
|
||||||
|
|
||||||
|
OpenTelemetry API implementations need to ignore the cancellation of the context that are
|
||||||
|
passed when recording a value (e.g. starting a span, recording a measurement, emitting a log).
|
||||||
|
Recording methods should not return an error describing the cancellation state of the context
|
||||||
|
when they complete, nor should they abort any work.
|
||||||
|
|
||||||
|
This rule may not apply if the OpenTelemetry specification defines a timeout mechanism for
|
||||||
|
the method. In that case the context cancellation can be used for the timeout with the
|
||||||
|
restriction that this behavior is documented for the method. Otherwise, timeouts
|
||||||
|
are expected to be handled by the user calling the API, not the implementation.
|
||||||
|
|
||||||
|
Stoppage of the telemetry pipeline is handled by calling the appropriate `Shutdown` method
|
||||||
|
of a provider. It is assumed the context passed from a user is not used for this purpose.
|
||||||
|
|
||||||
|
Outside of the direct recording of telemetry from the API (e.g. exporting telemetry,
|
||||||
|
force flushing telemetry, shutting down a signal provider) the context cancellation
|
||||||
|
should be honored. This means all work done on behalf of the user provided context
|
||||||
|
should be canceled.
|
||||||
|
|
||||||
## Approvers and Maintainers
|
## Approvers and Maintainers
|
||||||
|
|
||||||
### Approvers
|
### Approvers
|
||||||
|
|
||||||
- [Evan Torrie](https://github.com/evantorrie), Verizon Media
|
- [Evan Torrie](https://github.com/evantorrie), Verizon Media
|
||||||
- [Sam Xie](https://github.com/XSAM), Cisco/AppDynamics
|
- [Sam Xie](https://github.com/XSAM), Cisco/AppDynamics
|
||||||
- [David Ashpole](https://github.com/dashpole), Google
|
|
||||||
- [Chester Cheung](https://github.com/hanyuancheung), Tencent
|
- [Chester Cheung](https://github.com/hanyuancheung), Tencent
|
||||||
- [Damien Mathieu](https://github.com/dmathieu), Elastic
|
- [Damien Mathieu](https://github.com/dmathieu), Elastic
|
||||||
- [Anthony Mirabella](https://github.com/Aneurysm9), AWS
|
- [Anthony Mirabella](https://github.com/Aneurysm9), AWS
|
||||||
|
|
||||||
### Maintainers
|
### Maintainers
|
||||||
|
|
||||||
|
- [David Ashpole](https://github.com/dashpole), Google
|
||||||
- [Aaron Clawson](https://github.com/MadVikingGod), LightStep
|
- [Aaron Clawson](https://github.com/MadVikingGod), LightStep
|
||||||
- [Robert Pająk](https://github.com/pellared), Splunk
|
- [Robert Pająk](https://github.com/pellared), Splunk
|
||||||
- [Tyler Yahn](https://github.com/MrAlias), Splunk
|
- [Tyler Yahn](https://github.com/MrAlias), Splunk
|
||||||
|
|
||||||
### Emeritus
|
### Emeritus
|
||||||
|
|
||||||
|
- [Liz Fong-Jones](https://github.com/lizthegrey), Honeycomb
|
||||||
- [Gustavo Silva Paiva](https://github.com/paivagustavo), LightStep
|
- [Gustavo Silva Paiva](https://github.com/paivagustavo), LightStep
|
||||||
- [Josh MacDonald](https://github.com/jmacd), LightStep
|
- [Josh MacDonald](https://github.com/jmacd), LightStep
|
||||||
|
|
||||||
|
2
vendor/go.opentelemetry.io/otel/README.md
generated
vendored
2
vendor/go.opentelemetry.io/otel/README.md
generated
vendored
@ -66,7 +66,7 @@ are made for those systems currently.
|
|||||||
|
|
||||||
## Getting Started
|
## Getting Started
|
||||||
|
|
||||||
You can find a getting started guide on [opentelemetry.io](https://opentelemetry.io/docs/go/getting-started/).
|
You can find a getting started guide on [opentelemetry.io](https://opentelemetry.io/docs/languages/go/getting-started/).
|
||||||
|
|
||||||
OpenTelemetry's goal is to provide a single set of APIs to capture distributed
|
OpenTelemetry's goal is to provide a single set of APIs to capture distributed
|
||||||
traces and metrics from your application and send them to an observability
|
traces and metrics from your application and send them to an observability
|
||||||
|
6
vendor/go.opentelemetry.io/otel/RELEASING.md
generated
vendored
6
vendor/go.opentelemetry.io/otel/RELEASING.md
generated
vendored
@ -123,12 +123,12 @@ Once verified be sure to [make a release for the `contrib` repository](https://g
|
|||||||
|
|
||||||
### Website Documentation
|
### Website Documentation
|
||||||
|
|
||||||
Update the [Go instrumentation documentation] in the OpenTelemetry website under [content/en/docs/instrumentation/go].
|
Update the [Go instrumentation documentation] in the OpenTelemetry website under [content/en/docs/languages/go].
|
||||||
Importantly, bump any package versions referenced to be the latest one you just released and ensure all code examples still compile and are accurate.
|
Importantly, bump any package versions referenced to be the latest one you just released and ensure all code examples still compile and are accurate.
|
||||||
|
|
||||||
[OpenTelemetry Semantic Conventions]: https://github.com/open-telemetry/semantic-conventions
|
[OpenTelemetry Semantic Conventions]: https://github.com/open-telemetry/semantic-conventions
|
||||||
[Go instrumentation documentation]: https://opentelemetry.io/docs/instrumentation/go/
|
[Go instrumentation documentation]: https://opentelemetry.io/docs/languages/go/
|
||||||
[content/en/docs/instrumentation/go]: https://github.com/open-telemetry/opentelemetry.io/tree/main/content/en/docs/instrumentation/go
|
[content/en/docs/languages/go]: https://github.com/open-telemetry/opentelemetry.io/tree/main/content/en/docs/languages/go
|
||||||
|
|
||||||
### Demo Repository
|
### Demo Repository
|
||||||
|
|
||||||
|
93
vendor/go.opentelemetry.io/otel/attribute/set.go
generated
vendored
93
vendor/go.opentelemetry.io/otel/attribute/set.go
generated
vendored
@ -279,52 +279,75 @@ func NewSetWithSortableFiltered(kvs []KeyValue, tmp *Sortable, filter Filter) (S
|
|||||||
position--
|
position--
|
||||||
kvs[offset], kvs[position] = kvs[position], kvs[offset]
|
kvs[offset], kvs[position] = kvs[position], kvs[offset]
|
||||||
}
|
}
|
||||||
|
kvs = kvs[position:]
|
||||||
|
|
||||||
if filter != nil {
|
if filter != nil {
|
||||||
return filterSet(kvs[position:], filter)
|
if div := filteredToFront(kvs, filter); div != 0 {
|
||||||
}
|
return Set{equivalent: computeDistinct(kvs[div:])}, kvs[:div]
|
||||||
return Set{
|
|
||||||
equivalent: computeDistinct(kvs[position:]),
|
|
||||||
}, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// filterSet reorders kvs so that included keys are contiguous at the end of
|
|
||||||
// the slice, while excluded keys precede the included keys.
|
|
||||||
func filterSet(kvs []KeyValue, filter Filter) (Set, []KeyValue) {
|
|
||||||
var excluded []KeyValue
|
|
||||||
|
|
||||||
// Move attributes that do not match the filter so they're adjacent before
|
|
||||||
// calling computeDistinct().
|
|
||||||
distinctPosition := len(kvs)
|
|
||||||
|
|
||||||
// Swap indistinct keys forward and distinct keys toward the
|
|
||||||
// end of the slice.
|
|
||||||
offset := len(kvs) - 1
|
|
||||||
for ; offset >= 0; offset-- {
|
|
||||||
if filter(kvs[offset]) {
|
|
||||||
distinctPosition--
|
|
||||||
kvs[offset], kvs[distinctPosition] = kvs[distinctPosition], kvs[offset]
|
|
||||||
continue
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
excluded = kvs[:distinctPosition]
|
return Set{equivalent: computeDistinct(kvs)}, nil
|
||||||
|
}
|
||||||
|
|
||||||
return Set{
|
// filteredToFront filters slice in-place using keep function. All KeyValues that need to
|
||||||
equivalent: computeDistinct(kvs[distinctPosition:]),
|
// be removed are moved to the front. All KeyValues that need to be kept are
|
||||||
}, excluded
|
// moved (in-order) to the back. The index for the first KeyValue to be kept is
|
||||||
|
// returned.
|
||||||
|
func filteredToFront(slice []KeyValue, keep Filter) int {
|
||||||
|
n := len(slice)
|
||||||
|
j := n
|
||||||
|
for i := n - 1; i >= 0; i-- {
|
||||||
|
if keep(slice[i]) {
|
||||||
|
j--
|
||||||
|
slice[i], slice[j] = slice[j], slice[i]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return j
|
||||||
}
|
}
|
||||||
|
|
||||||
// Filter returns a filtered copy of this Set. See the documentation for
|
// Filter returns a filtered copy of this Set. See the documentation for
|
||||||
// NewSetWithSortableFiltered for more details.
|
// NewSetWithSortableFiltered for more details.
|
||||||
func (l *Set) Filter(re Filter) (Set, []KeyValue) {
|
func (l *Set) Filter(re Filter) (Set, []KeyValue) {
|
||||||
if re == nil {
|
if re == nil {
|
||||||
return Set{
|
return *l, nil
|
||||||
equivalent: l.equivalent,
|
|
||||||
}, nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Note: This could be refactored to avoid the temporary slice
|
// Iterate in reverse to the first attribute that will be filtered out.
|
||||||
// allocation, if it proves to be expensive.
|
n := l.Len()
|
||||||
return filterSet(l.ToSlice(), re)
|
first := n - 1
|
||||||
|
for ; first >= 0; first-- {
|
||||||
|
kv, _ := l.Get(first)
|
||||||
|
if !re(kv) {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// No attributes will be dropped, return the immutable Set l and nil.
|
||||||
|
if first < 0 {
|
||||||
|
return *l, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Copy now that we know we need to return a modified set.
|
||||||
|
//
|
||||||
|
// Do not do this in-place on the underlying storage of *Set l. Sets are
|
||||||
|
// immutable and filtering should not change this.
|
||||||
|
slice := l.ToSlice()
|
||||||
|
|
||||||
|
// Don't re-iterate the slice if only slice[0] is filtered.
|
||||||
|
if first == 0 {
|
||||||
|
// It is safe to assume len(slice) >= 1 given we found at least one
|
||||||
|
// attribute above that needs to be filtered out.
|
||||||
|
return Set{equivalent: computeDistinct(slice[1:])}, slice[:1]
|
||||||
|
}
|
||||||
|
|
||||||
|
// Move the filtered slice[first] to the front (preserving order).
|
||||||
|
kv := slice[first]
|
||||||
|
copy(slice[1:first+1], slice[:first])
|
||||||
|
slice[0] = kv
|
||||||
|
|
||||||
|
// Do not re-evaluate re(slice[first+1:]).
|
||||||
|
div := filteredToFront(slice[1:first+1], re) + 1
|
||||||
|
return Set{equivalent: computeDistinct(slice[div:])}, slice[:div]
|
||||||
}
|
}
|
||||||
|
|
||||||
// computeDistinct returns a Distinct using either the fixed- or
|
// computeDistinct returns a Distinct using either the fixed- or
|
||||||
@ -404,7 +427,7 @@ func (l *Set) MarshalJSON() ([]byte, error) {
|
|||||||
return json.Marshal(l.equivalent.iface)
|
return json.Marshal(l.equivalent.iface)
|
||||||
}
|
}
|
||||||
|
|
||||||
// MarshalLog is the marshaling function used by the logging system to represent this exporter.
|
// MarshalLog is the marshaling function used by the logging system to represent this Set.
|
||||||
func (l Set) MarshalLog() interface{} {
|
func (l Set) MarshalLog() interface{} {
|
||||||
kvs := make(map[string]string)
|
kvs := make(map[string]string)
|
||||||
for _, kv := range l.ToSlice() {
|
for _, kv := range l.ToSlice() {
|
||||||
|
332
vendor/go.opentelemetry.io/otel/baggage/baggage.go
generated
vendored
332
vendor/go.opentelemetry.io/otel/baggage/baggage.go
generated
vendored
@ -18,7 +18,6 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/url"
|
"net/url"
|
||||||
"regexp"
|
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"go.opentelemetry.io/otel/internal/baggage"
|
"go.opentelemetry.io/otel/internal/baggage"
|
||||||
@ -32,16 +31,6 @@ const (
|
|||||||
listDelimiter = ","
|
listDelimiter = ","
|
||||||
keyValueDelimiter = "="
|
keyValueDelimiter = "="
|
||||||
propertyDelimiter = ";"
|
propertyDelimiter = ";"
|
||||||
|
|
||||||
keyDef = `([\x21\x23-\x27\x2A\x2B\x2D\x2E\x30-\x39\x41-\x5a\x5e-\x7a\x7c\x7e]+)`
|
|
||||||
valueDef = `([\x21\x23-\x2b\x2d-\x3a\x3c-\x5B\x5D-\x7e]*)`
|
|
||||||
keyValueDef = `\s*` + keyDef + `\s*` + keyValueDelimiter + `\s*` + valueDef + `\s*`
|
|
||||||
)
|
|
||||||
|
|
||||||
var (
|
|
||||||
keyRe = regexp.MustCompile(`^` + keyDef + `$`)
|
|
||||||
valueRe = regexp.MustCompile(`^` + valueDef + `$`)
|
|
||||||
propertyRe = regexp.MustCompile(`^(?:\s*` + keyDef + `\s*|` + keyValueDef + `)$`)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -67,7 +56,7 @@ type Property struct {
|
|||||||
//
|
//
|
||||||
// If key is invalid, an error will be returned.
|
// If key is invalid, an error will be returned.
|
||||||
func NewKeyProperty(key string) (Property, error) {
|
func NewKeyProperty(key string) (Property, error) {
|
||||||
if !keyRe.MatchString(key) {
|
if !validateKey(key) {
|
||||||
return newInvalidProperty(), fmt.Errorf("%w: %q", errInvalidKey, key)
|
return newInvalidProperty(), fmt.Errorf("%w: %q", errInvalidKey, key)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -77,14 +66,29 @@ func NewKeyProperty(key string) (Property, error) {
|
|||||||
|
|
||||||
// NewKeyValueProperty returns a new Property for key with value.
|
// NewKeyValueProperty returns a new Property for key with value.
|
||||||
//
|
//
|
||||||
// If key or value are invalid, an error will be returned.
|
// The passed key must be compliant with W3C Baggage specification.
|
||||||
|
// The passed value must be precent-encoded as defined in W3C Baggage specification.
|
||||||
|
//
|
||||||
|
// Notice: Consider using [NewKeyValuePropertyRaw] instead
|
||||||
|
// that does not require precent-encoding of the value.
|
||||||
func NewKeyValueProperty(key, value string) (Property, error) {
|
func NewKeyValueProperty(key, value string) (Property, error) {
|
||||||
if !keyRe.MatchString(key) {
|
if !validateValue(value) {
|
||||||
return newInvalidProperty(), fmt.Errorf("%w: %q", errInvalidKey, key)
|
|
||||||
}
|
|
||||||
if !valueRe.MatchString(value) {
|
|
||||||
return newInvalidProperty(), fmt.Errorf("%w: %q", errInvalidValue, value)
|
return newInvalidProperty(), fmt.Errorf("%w: %q", errInvalidValue, value)
|
||||||
}
|
}
|
||||||
|
decodedValue, err := url.PathUnescape(value)
|
||||||
|
if err != nil {
|
||||||
|
return newInvalidProperty(), fmt.Errorf("%w: %q", errInvalidValue, value)
|
||||||
|
}
|
||||||
|
return NewKeyValuePropertyRaw(key, decodedValue)
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewKeyValuePropertyRaw returns a new Property for key with value.
|
||||||
|
//
|
||||||
|
// The passed key must be compliant with W3C Baggage specification.
|
||||||
|
func NewKeyValuePropertyRaw(key, value string) (Property, error) {
|
||||||
|
if !validateKey(key) {
|
||||||
|
return newInvalidProperty(), fmt.Errorf("%w: %q", errInvalidKey, key)
|
||||||
|
}
|
||||||
|
|
||||||
p := Property{
|
p := Property{
|
||||||
key: key,
|
key: key,
|
||||||
@ -106,20 +110,11 @@ func parseProperty(property string) (Property, error) {
|
|||||||
return newInvalidProperty(), nil
|
return newInvalidProperty(), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
match := propertyRe.FindStringSubmatch(property)
|
p, ok := parsePropertyInternal(property)
|
||||||
if len(match) != 4 {
|
if !ok {
|
||||||
return newInvalidProperty(), fmt.Errorf("%w: %q", errInvalidProperty, property)
|
return newInvalidProperty(), fmt.Errorf("%w: %q", errInvalidProperty, property)
|
||||||
}
|
}
|
||||||
|
|
||||||
var p Property
|
|
||||||
if match[1] != "" {
|
|
||||||
p.key = match[1]
|
|
||||||
} else {
|
|
||||||
p.key = match[2]
|
|
||||||
p.value = match[3]
|
|
||||||
p.hasValue = true
|
|
||||||
}
|
|
||||||
|
|
||||||
return p, nil
|
return p, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -130,12 +125,9 @@ func (p Property) validate() error {
|
|||||||
return fmt.Errorf("invalid property: %w", err)
|
return fmt.Errorf("invalid property: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if !keyRe.MatchString(p.key) {
|
if !validateKey(p.key) {
|
||||||
return errFunc(fmt.Errorf("%w: %q", errInvalidKey, p.key))
|
return errFunc(fmt.Errorf("%w: %q", errInvalidKey, p.key))
|
||||||
}
|
}
|
||||||
if p.hasValue && !valueRe.MatchString(p.value) {
|
|
||||||
return errFunc(fmt.Errorf("%w: %q", errInvalidValue, p.value))
|
|
||||||
}
|
|
||||||
if !p.hasValue && p.value != "" {
|
if !p.hasValue && p.value != "" {
|
||||||
return errFunc(errors.New("inconsistent value"))
|
return errFunc(errors.New("inconsistent value"))
|
||||||
}
|
}
|
||||||
@ -154,11 +146,11 @@ func (p Property) Value() (string, bool) {
|
|||||||
return p.value, p.hasValue
|
return p.value, p.hasValue
|
||||||
}
|
}
|
||||||
|
|
||||||
// String encodes Property into a string compliant with the W3C Baggage
|
// String encodes Property into a header string compliant with the W3C Baggage
|
||||||
// specification.
|
// specification.
|
||||||
func (p Property) String() string {
|
func (p Property) String() string {
|
||||||
if p.hasValue {
|
if p.hasValue {
|
||||||
return fmt.Sprintf("%s%s%v", p.key, keyValueDelimiter, p.value)
|
return fmt.Sprintf("%s%s%v", p.key, keyValueDelimiter, valueEscape(p.value))
|
||||||
}
|
}
|
||||||
return p.key
|
return p.key
|
||||||
}
|
}
|
||||||
@ -218,7 +210,7 @@ func (p properties) validate() error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// String encodes properties into a string compliant with the W3C Baggage
|
// String encodes properties into a header string compliant with the W3C Baggage
|
||||||
// specification.
|
// specification.
|
||||||
func (p properties) String() string {
|
func (p properties) String() string {
|
||||||
props := make([]string, len(p))
|
props := make([]string, len(p))
|
||||||
@ -240,11 +232,28 @@ type Member struct {
|
|||||||
hasData bool
|
hasData bool
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewMember returns a new Member from the passed arguments. The key will be
|
// NewMemberRaw returns a new Member from the passed arguments.
|
||||||
// used directly while the value will be url decoded after validation. An error
|
//
|
||||||
// is returned if the created Member would be invalid according to the W3C
|
// The passed key must be compliant with W3C Baggage specification.
|
||||||
// Baggage specification.
|
// The passed value must be precent-encoded as defined in W3C Baggage specification.
|
||||||
|
//
|
||||||
|
// Notice: Consider using [NewMemberRaw] instead
|
||||||
|
// that does not require precent-encoding of the value.
|
||||||
func NewMember(key, value string, props ...Property) (Member, error) {
|
func NewMember(key, value string, props ...Property) (Member, error) {
|
||||||
|
if !validateValue(value) {
|
||||||
|
return newInvalidMember(), fmt.Errorf("%w: %q", errInvalidValue, value)
|
||||||
|
}
|
||||||
|
decodedValue, err := url.PathUnescape(value)
|
||||||
|
if err != nil {
|
||||||
|
return newInvalidMember(), fmt.Errorf("%w: %q", errInvalidValue, value)
|
||||||
|
}
|
||||||
|
return NewMemberRaw(key, decodedValue, props...)
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewMemberRaw returns a new Member from the passed arguments.
|
||||||
|
//
|
||||||
|
// The passed key must be compliant with W3C Baggage specification.
|
||||||
|
func NewMemberRaw(key, value string, props ...Property) (Member, error) {
|
||||||
m := Member{
|
m := Member{
|
||||||
key: key,
|
key: key,
|
||||||
value: value,
|
value: value,
|
||||||
@ -254,11 +263,6 @@ func NewMember(key, value string, props ...Property) (Member, error) {
|
|||||||
if err := m.validate(); err != nil {
|
if err := m.validate(); err != nil {
|
||||||
return newInvalidMember(), err
|
return newInvalidMember(), err
|
||||||
}
|
}
|
||||||
decodedValue, err := url.PathUnescape(value)
|
|
||||||
if err != nil {
|
|
||||||
return newInvalidMember(), fmt.Errorf("%w: %q", errInvalidValue, value)
|
|
||||||
}
|
|
||||||
m.value = decodedValue
|
|
||||||
return m, nil
|
return m, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -274,11 +278,7 @@ func parseMember(member string) (Member, error) {
|
|||||||
return newInvalidMember(), fmt.Errorf("%w: %d", errMemberBytes, n)
|
return newInvalidMember(), fmt.Errorf("%w: %d", errMemberBytes, n)
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var props properties
|
||||||
key, value string
|
|
||||||
props properties
|
|
||||||
)
|
|
||||||
|
|
||||||
keyValue, properties, found := strings.Cut(member, propertyDelimiter)
|
keyValue, properties, found := strings.Cut(member, propertyDelimiter)
|
||||||
if found {
|
if found {
|
||||||
// Parse the member properties.
|
// Parse the member properties.
|
||||||
@ -299,36 +299,34 @@ func parseMember(member string) (Member, error) {
|
|||||||
}
|
}
|
||||||
// "Leading and trailing whitespaces are allowed but MUST be trimmed
|
// "Leading and trailing whitespaces are allowed but MUST be trimmed
|
||||||
// when converting the header into a data structure."
|
// when converting the header into a data structure."
|
||||||
key = strings.TrimSpace(k)
|
key := strings.TrimSpace(k)
|
||||||
var err error
|
if !validateKey(key) {
|
||||||
value, err = url.PathUnescape(strings.TrimSpace(v))
|
|
||||||
if err != nil {
|
|
||||||
return newInvalidMember(), fmt.Errorf("%w: %q", err, value)
|
|
||||||
}
|
|
||||||
if !keyRe.MatchString(key) {
|
|
||||||
return newInvalidMember(), fmt.Errorf("%w: %q", errInvalidKey, key)
|
return newInvalidMember(), fmt.Errorf("%w: %q", errInvalidKey, key)
|
||||||
}
|
}
|
||||||
if !valueRe.MatchString(value) {
|
|
||||||
return newInvalidMember(), fmt.Errorf("%w: %q", errInvalidValue, value)
|
val := strings.TrimSpace(v)
|
||||||
|
if !validateValue(val) {
|
||||||
|
return newInvalidMember(), fmt.Errorf("%w: %q", errInvalidValue, v)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Decode a precent-encoded value.
|
||||||
|
value, err := url.PathUnescape(val)
|
||||||
|
if err != nil {
|
||||||
|
return newInvalidMember(), fmt.Errorf("%w: %v", errInvalidValue, err)
|
||||||
|
}
|
||||||
return Member{key: key, value: value, properties: props, hasData: true}, nil
|
return Member{key: key, value: value, properties: props, hasData: true}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// validate ensures m conforms to the W3C Baggage specification.
|
// validate ensures m conforms to the W3C Baggage specification.
|
||||||
// A key is just an ASCII string, but a value must be URL encoded UTF-8,
|
// A key must be an ASCII string, returning an error otherwise.
|
||||||
// returning an error otherwise.
|
|
||||||
func (m Member) validate() error {
|
func (m Member) validate() error {
|
||||||
if !m.hasData {
|
if !m.hasData {
|
||||||
return fmt.Errorf("%w: %q", errInvalidMember, m)
|
return fmt.Errorf("%w: %q", errInvalidMember, m)
|
||||||
}
|
}
|
||||||
|
|
||||||
if !keyRe.MatchString(m.key) {
|
if !validateKey(m.key) {
|
||||||
return fmt.Errorf("%w: %q", errInvalidKey, m.key)
|
return fmt.Errorf("%w: %q", errInvalidKey, m.key)
|
||||||
}
|
}
|
||||||
if !valueRe.MatchString(m.value) {
|
|
||||||
return fmt.Errorf("%w: %q", errInvalidValue, m.value)
|
|
||||||
}
|
|
||||||
return m.properties.validate()
|
return m.properties.validate()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -341,11 +339,13 @@ func (m Member) Value() string { return m.value }
|
|||||||
// Properties returns a copy of the Member properties.
|
// Properties returns a copy of the Member properties.
|
||||||
func (m Member) Properties() []Property { return m.properties.Copy() }
|
func (m Member) Properties() []Property { return m.properties.Copy() }
|
||||||
|
|
||||||
// String encodes Member into a string compliant with the W3C Baggage
|
// String encodes Member into a header string compliant with the W3C Baggage
|
||||||
// specification.
|
// specification.
|
||||||
func (m Member) String() string {
|
func (m Member) String() string {
|
||||||
// A key is just an ASCII string, but a value is URL encoded UTF-8.
|
// A key is just an ASCII string. A value is restricted to be
|
||||||
s := fmt.Sprintf("%s%s%s", m.key, keyValueDelimiter, url.QueryEscape(m.value))
|
// US-ASCII characters excluding CTLs, whitespace,
|
||||||
|
// DQUOTE, comma, semicolon, and backslash.
|
||||||
|
s := fmt.Sprintf("%s%s%s", m.key, keyValueDelimiter, valueEscape(m.value))
|
||||||
if len(m.properties) > 0 {
|
if len(m.properties) > 0 {
|
||||||
s = fmt.Sprintf("%s%s%s", s, propertyDelimiter, m.properties.String())
|
s = fmt.Sprintf("%s%s%s", s, propertyDelimiter, m.properties.String())
|
||||||
}
|
}
|
||||||
@ -536,9 +536,8 @@ func (b Baggage) Len() int {
|
|||||||
return len(b.list)
|
return len(b.list)
|
||||||
}
|
}
|
||||||
|
|
||||||
// String encodes Baggage into a string compliant with the W3C Baggage
|
// String encodes Baggage into a header string compliant with the W3C Baggage
|
||||||
// specification. The returned string will be invalid if the Baggage contains
|
// specification.
|
||||||
// any invalid list-members.
|
|
||||||
func (b Baggage) String() string {
|
func (b Baggage) String() string {
|
||||||
members := make([]string, 0, len(b.list))
|
members := make([]string, 0, len(b.list))
|
||||||
for k, v := range b.list {
|
for k, v := range b.list {
|
||||||
@ -550,3 +549,196 @@ func (b Baggage) String() string {
|
|||||||
}
|
}
|
||||||
return strings.Join(members, listDelimiter)
|
return strings.Join(members, listDelimiter)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// parsePropertyInternal attempts to decode a Property from the passed string.
|
||||||
|
// It follows the spec at https://www.w3.org/TR/baggage/#definition.
|
||||||
|
func parsePropertyInternal(s string) (p Property, ok bool) {
|
||||||
|
// For the entire function we will use " key = value " as an example.
|
||||||
|
// Attempting to parse the key.
|
||||||
|
// First skip spaces at the beginning "< >key = value " (they could be empty).
|
||||||
|
index := skipSpace(s, 0)
|
||||||
|
|
||||||
|
// Parse the key: " <key> = value ".
|
||||||
|
keyStart := index
|
||||||
|
keyEnd := index
|
||||||
|
for _, c := range s[keyStart:] {
|
||||||
|
if !validateKeyChar(c) {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
keyEnd++
|
||||||
|
}
|
||||||
|
|
||||||
|
// If we couldn't find any valid key character,
|
||||||
|
// it means the key is either empty or invalid.
|
||||||
|
if keyStart == keyEnd {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Skip spaces after the key: " key< >= value ".
|
||||||
|
index = skipSpace(s, keyEnd)
|
||||||
|
|
||||||
|
if index == len(s) {
|
||||||
|
// A key can have no value, like: " key ".
|
||||||
|
ok = true
|
||||||
|
p.key = s[keyStart:keyEnd]
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// If we have not reached the end and we can't find the '=' delimiter,
|
||||||
|
// it means the property is invalid.
|
||||||
|
if s[index] != keyValueDelimiter[0] {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Attempting to parse the value.
|
||||||
|
// Match: " key =< >value ".
|
||||||
|
index = skipSpace(s, index+1)
|
||||||
|
|
||||||
|
// Match the value string: " key = <value> ".
|
||||||
|
// A valid property can be: " key =".
|
||||||
|
// Therefore, we don't have to check if the value is empty.
|
||||||
|
valueStart := index
|
||||||
|
valueEnd := index
|
||||||
|
for _, c := range s[valueStart:] {
|
||||||
|
if !validateValueChar(c) {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
valueEnd++
|
||||||
|
}
|
||||||
|
|
||||||
|
// Skip all trailing whitespaces: " key = value< >".
|
||||||
|
index = skipSpace(s, valueEnd)
|
||||||
|
|
||||||
|
// If after looking for the value and skipping whitespaces
|
||||||
|
// we have not reached the end, it means the property is
|
||||||
|
// invalid, something like: " key = value value1".
|
||||||
|
if index != len(s) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Decode a precent-encoded value.
|
||||||
|
value, err := url.PathUnescape(s[valueStart:valueEnd])
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
ok = true
|
||||||
|
p.key = s[keyStart:keyEnd]
|
||||||
|
p.hasValue = true
|
||||||
|
|
||||||
|
p.value = value
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func skipSpace(s string, offset int) int {
|
||||||
|
i := offset
|
||||||
|
for ; i < len(s); i++ {
|
||||||
|
c := s[i]
|
||||||
|
if c != ' ' && c != '\t' {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return i
|
||||||
|
}
|
||||||
|
|
||||||
|
func validateKey(s string) bool {
|
||||||
|
if len(s) == 0 {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, c := range s {
|
||||||
|
if !validateKeyChar(c) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
func validateKeyChar(c int32) bool {
|
||||||
|
return (c >= 0x23 && c <= 0x27) ||
|
||||||
|
(c >= 0x30 && c <= 0x39) ||
|
||||||
|
(c >= 0x41 && c <= 0x5a) ||
|
||||||
|
(c >= 0x5e && c <= 0x7a) ||
|
||||||
|
c == 0x21 ||
|
||||||
|
c == 0x2a ||
|
||||||
|
c == 0x2b ||
|
||||||
|
c == 0x2d ||
|
||||||
|
c == 0x2e ||
|
||||||
|
c == 0x7c ||
|
||||||
|
c == 0x7e
|
||||||
|
}
|
||||||
|
|
||||||
|
func validateValue(s string) bool {
|
||||||
|
for _, c := range s {
|
||||||
|
if !validateValueChar(c) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
func validateValueChar(c int32) bool {
|
||||||
|
return c == 0x21 ||
|
||||||
|
(c >= 0x23 && c <= 0x2b) ||
|
||||||
|
(c >= 0x2d && c <= 0x3a) ||
|
||||||
|
(c >= 0x3c && c <= 0x5b) ||
|
||||||
|
(c >= 0x5d && c <= 0x7e)
|
||||||
|
}
|
||||||
|
|
||||||
|
// valueEscape escapes the string so it can be safely placed inside a baggage value,
|
||||||
|
// replacing special characters with %XX sequences as needed.
|
||||||
|
//
|
||||||
|
// The implementation is based on:
|
||||||
|
// https://github.com/golang/go/blob/f6509cf5cdbb5787061b784973782933c47f1782/src/net/url/url.go#L285.
|
||||||
|
func valueEscape(s string) string {
|
||||||
|
hexCount := 0
|
||||||
|
for i := 0; i < len(s); i++ {
|
||||||
|
c := s[i]
|
||||||
|
if shouldEscape(c) {
|
||||||
|
hexCount++
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if hexCount == 0 {
|
||||||
|
return s
|
||||||
|
}
|
||||||
|
|
||||||
|
var buf [64]byte
|
||||||
|
var t []byte
|
||||||
|
|
||||||
|
required := len(s) + 2*hexCount
|
||||||
|
if required <= len(buf) {
|
||||||
|
t = buf[:required]
|
||||||
|
} else {
|
||||||
|
t = make([]byte, required)
|
||||||
|
}
|
||||||
|
|
||||||
|
j := 0
|
||||||
|
for i := 0; i < len(s); i++ {
|
||||||
|
c := s[i]
|
||||||
|
if shouldEscape(s[i]) {
|
||||||
|
const upperhex = "0123456789ABCDEF"
|
||||||
|
t[j] = '%'
|
||||||
|
t[j+1] = upperhex[c>>4]
|
||||||
|
t[j+2] = upperhex[c&15]
|
||||||
|
j += 3
|
||||||
|
} else {
|
||||||
|
t[j] = c
|
||||||
|
j++
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return string(t)
|
||||||
|
}
|
||||||
|
|
||||||
|
// shouldEscape returns true if the specified byte should be escaped when
|
||||||
|
// appearing in a baggage value string.
|
||||||
|
func shouldEscape(c byte) bool {
|
||||||
|
if c == '%' {
|
||||||
|
// The percent character must be encoded so that percent-encoding can work.
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return !validateValueChar(int32(c))
|
||||||
|
}
|
||||||
|
2
vendor/go.opentelemetry.io/otel/doc.go
generated
vendored
2
vendor/go.opentelemetry.io/otel/doc.go
generated
vendored
@ -22,7 +22,7 @@ transmitted anywhere. An implementation of the OpenTelemetry SDK, like the
|
|||||||
default SDK implementation (go.opentelemetry.io/otel/sdk), and associated
|
default SDK implementation (go.opentelemetry.io/otel/sdk), and associated
|
||||||
exporters are used to process and transport this data.
|
exporters are used to process and transport this data.
|
||||||
|
|
||||||
To read the getting started guide, see https://opentelemetry.io/docs/go/getting-started/.
|
To read the getting started guide, see https://opentelemetry.io/docs/languages/go/getting-started/.
|
||||||
|
|
||||||
To read more about tracing, see go.opentelemetry.io/otel/trace.
|
To read more about tracing, see go.opentelemetry.io/otel/trace.
|
||||||
|
|
||||||
|
51
vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/README.md
generated
vendored
51
vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/README.md
generated
vendored
@ -1,51 +0,0 @@
|
|||||||
# OpenTelemetry-Go OTLP Span Exporter
|
|
||||||
|
|
||||||
[](https://pkg.go.dev/go.opentelemetry.io/otel/exporters/otlp/otlptrace)
|
|
||||||
|
|
||||||
[OpenTelemetry Protocol Exporter](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.20.0/specification/protocol/exporter.md) implementation.
|
|
||||||
|
|
||||||
## Installation
|
|
||||||
|
|
||||||
```
|
|
||||||
go get -u go.opentelemetry.io/otel/exporters/otlp/otlptrace
|
|
||||||
```
|
|
||||||
|
|
||||||
## Examples
|
|
||||||
|
|
||||||
- [HTTP Exporter setup and examples](./otlptracehttp/example_test.go)
|
|
||||||
- [Full example of gRPC Exporter sending telemetry to a local collector](../../../example/otel-collector)
|
|
||||||
|
|
||||||
## [`otlptrace`](https://pkg.go.dev/go.opentelemetry.io/otel/exporters/otlp/otlptrace)
|
|
||||||
|
|
||||||
The `otlptrace` package provides an exporter implementing the OTel span exporter interface.
|
|
||||||
This exporter is configured using a client satisfying the `otlptrace.Client` interface.
|
|
||||||
This client handles the transformation of data into wire format and the transmission of that data to the collector.
|
|
||||||
|
|
||||||
## [`otlptracegrpc`](https://pkg.go.dev/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc)
|
|
||||||
|
|
||||||
The `otlptracegrpc` package implements a client for the span exporter that sends trace telemetry data to the collector using gRPC with protobuf-encoded payloads.
|
|
||||||
|
|
||||||
## [`otlptracehttp`](https://pkg.go.dev/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp)
|
|
||||||
|
|
||||||
The `otlptracehttp` package implements a client for the span exporter that sends trace telemetry data to the collector using HTTP with protobuf-encoded payloads.
|
|
||||||
|
|
||||||
## Configuration
|
|
||||||
|
|
||||||
### Environment Variables
|
|
||||||
|
|
||||||
The following environment variables can be used (instead of options objects) to
|
|
||||||
override the default configuration. For more information about how each of
|
|
||||||
these environment variables is interpreted, see [the OpenTelemetry
|
|
||||||
specification](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.20.0/specification/protocol/exporter.md).
|
|
||||||
|
|
||||||
| Environment variable | Option | Default value |
|
|
||||||
| ------------------------------------------------------------------------ |------------------------------ | -------------------------------------------------------- |
|
|
||||||
| `OTEL_EXPORTER_OTLP_ENDPOINT` `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT` | `WithEndpoint` `WithInsecure` | `https://localhost:4317` or `https://localhost:4318`[^1] |
|
|
||||||
| `OTEL_EXPORTER_OTLP_CERTIFICATE` `OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE` | `WithTLSClientConfig` | |
|
|
||||||
| `OTEL_EXPORTER_OTLP_HEADERS` `OTEL_EXPORTER_OTLP_TRACES_HEADERS` | `WithHeaders` | |
|
|
||||||
| `OTEL_EXPORTER_OTLP_COMPRESSION` `OTEL_EXPORTER_OTLP_TRACES_COMPRESSION` | `WithCompression` | |
|
|
||||||
| `OTEL_EXPORTER_OTLP_TIMEOUT` `OTEL_EXPORTER_OTLP_TRACES_TIMEOUT` | `WithTimeout` | `10s` |
|
|
||||||
|
|
||||||
[^1]: The gRPC client defaults to `https://localhost:4317` and the HTTP client `https://localhost:4318`.
|
|
||||||
|
|
||||||
Configuration using options have precedence over the environment variables.
|
|
21
vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/doc.go
generated
vendored
Normal file
21
vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/doc.go
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
// Copyright The OpenTelemetry Authors
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
/*
|
||||||
|
Package otlptrace contains abstractions for OTLP span exporters.
|
||||||
|
See the official OTLP span exporter implementations:
|
||||||
|
- [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc],
|
||||||
|
- [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp].
|
||||||
|
*/
|
||||||
|
package otlptrace // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace"
|
8
vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/exporter.go
generated
vendored
8
vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/exporter.go
generated
vendored
@ -24,9 +24,7 @@ import (
|
|||||||
tracesdk "go.opentelemetry.io/otel/sdk/trace"
|
tracesdk "go.opentelemetry.io/otel/sdk/trace"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var errAlreadyStarted = errors.New("already started")
|
||||||
errAlreadyStarted = errors.New("already started")
|
|
||||||
)
|
|
||||||
|
|
||||||
// Exporter exports trace data in the OTLP wire format.
|
// Exporter exports trace data in the OTLP wire format.
|
||||||
type Exporter struct {
|
type Exporter struct {
|
||||||
@ -55,7 +53,7 @@ func (e *Exporter) ExportSpans(ctx context.Context, ss []tracesdk.ReadOnlySpan)
|
|||||||
|
|
||||||
// Start establishes a connection to the receiving endpoint.
|
// Start establishes a connection to the receiving endpoint.
|
||||||
func (e *Exporter) Start(ctx context.Context) error {
|
func (e *Exporter) Start(ctx context.Context) error {
|
||||||
var err = errAlreadyStarted
|
err := errAlreadyStarted
|
||||||
e.startOnce.Do(func() {
|
e.startOnce.Do(func() {
|
||||||
e.mu.Lock()
|
e.mu.Lock()
|
||||||
e.started = true
|
e.started = true
|
||||||
@ -106,7 +104,7 @@ func NewUnstarted(client Client) *Exporter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// MarshalLog is the marshaling function used by the logging system to represent this exporter.
|
// MarshalLog is the marshaling function used by the logging system to represent this Exporter.
|
||||||
func (e *Exporter) MarshalLog() interface{} {
|
func (e *Exporter) MarshalLog() interface{} {
|
||||||
return struct {
|
return struct {
|
||||||
Type string
|
Type string
|
||||||
|
22
vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/client.go
generated
vendored
22
vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/client.go
generated
vendored
@ -260,30 +260,38 @@ func (c *client) exportContext(parent context.Context) (context.Context, context
|
|||||||
// duration to wait for if an explicit throttle time is included in err.
|
// duration to wait for if an explicit throttle time is included in err.
|
||||||
func retryable(err error) (bool, time.Duration) {
|
func retryable(err error) (bool, time.Duration) {
|
||||||
s := status.Convert(err)
|
s := status.Convert(err)
|
||||||
|
return retryableGRPCStatus(s)
|
||||||
|
}
|
||||||
|
|
||||||
|
func retryableGRPCStatus(s *status.Status) (bool, time.Duration) {
|
||||||
switch s.Code() {
|
switch s.Code() {
|
||||||
case codes.Canceled,
|
case codes.Canceled,
|
||||||
codes.DeadlineExceeded,
|
codes.DeadlineExceeded,
|
||||||
codes.ResourceExhausted,
|
|
||||||
codes.Aborted,
|
codes.Aborted,
|
||||||
codes.OutOfRange,
|
codes.OutOfRange,
|
||||||
codes.Unavailable,
|
codes.Unavailable,
|
||||||
codes.DataLoss:
|
codes.DataLoss:
|
||||||
return true, throttleDelay(s)
|
// Additionally handle RetryInfo.
|
||||||
|
_, d := throttleDelay(s)
|
||||||
|
return true, d
|
||||||
|
case codes.ResourceExhausted:
|
||||||
|
// Retry only if the server signals that the recovery from resource exhaustion is possible.
|
||||||
|
return throttleDelay(s)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Not a retry-able error.
|
// Not a retry-able error.
|
||||||
return false, 0
|
return false, 0
|
||||||
}
|
}
|
||||||
|
|
||||||
// throttleDelay returns a duration to wait for if an explicit throttle time
|
// throttleDelay returns of the status is RetryInfo
|
||||||
// is included in the response status.
|
// and the its duration to wait for if an explicit throttle time.
|
||||||
func throttleDelay(s *status.Status) time.Duration {
|
func throttleDelay(s *status.Status) (bool, time.Duration) {
|
||||||
for _, detail := range s.Details() {
|
for _, detail := range s.Details() {
|
||||||
if t, ok := detail.(*errdetails.RetryInfo); ok {
|
if t, ok := detail.(*errdetails.RetryInfo); ok {
|
||||||
return t.RetryDelay.AsDuration()
|
return true, t.RetryDelay.AsDuration()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0
|
return false, 0
|
||||||
}
|
}
|
||||||
|
|
||||||
// MarshalLog is the marshaling function used by the logging system to represent this Client.
|
// MarshalLog is the marshaling function used by the logging system to represent this Client.
|
||||||
|
77
vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/doc.go
generated
vendored
Normal file
77
vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/doc.go
generated
vendored
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
// Copyright The OpenTelemetry Authors
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
/*
|
||||||
|
Package otlptracegrpc provides an OTLP span exporter using gRPC.
|
||||||
|
By default the telemetry is sent to https://localhost:4317.
|
||||||
|
|
||||||
|
Exporter should be created using [New].
|
||||||
|
|
||||||
|
The environment variables described below can be used for configuration.
|
||||||
|
|
||||||
|
OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_EXPORTER_OTLP_TRACES_ENDPOINT (default: "https://localhost:4317") -
|
||||||
|
target to which the exporter sends telemetry.
|
||||||
|
The target syntax is defined in https://github.com/grpc/grpc/blob/master/doc/naming.md.
|
||||||
|
The value must contain a host.
|
||||||
|
The value may additionally a port, a scheme, and a path.
|
||||||
|
The value accepts "http" and "https" scheme.
|
||||||
|
The value should not contain a query string or fragment.
|
||||||
|
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT takes precedence over OTEL_EXPORTER_OTLP_ENDPOINT.
|
||||||
|
The configuration can be overridden by [WithEndpoint], [WithEndpointURL], [WithInsecure], and [WithGRPCConn] options.
|
||||||
|
|
||||||
|
OTEL_EXPORTER_OTLP_INSECURE, OTEL_EXPORTER_OTLP_TRACES_INSECURE (default: "false") -
|
||||||
|
setting "true" disables client transport security for the exporter's gRPC connection.
|
||||||
|
You can use this only when an endpoint is provided without the http or https scheme.
|
||||||
|
OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_EXPORTER_OTLP_TRACES_ENDPOINT setting overrides
|
||||||
|
the scheme defined via OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_EXPORTER_OTLP_TRACES_ENDPOINT.
|
||||||
|
OTEL_EXPORTER_OTLP_TRACES_INSECURE takes precedence over OTEL_EXPORTER_OTLP_INSECURE.
|
||||||
|
The configuration can be overridden by [WithInsecure], [WithGRPCConn] options.
|
||||||
|
|
||||||
|
OTEL_EXPORTER_OTLP_HEADERS, OTEL_EXPORTER_OTLP_TRACES_HEADERS (default: none) -
|
||||||
|
key-value pairs used as gRPC metadata associated with gRPC requests.
|
||||||
|
The value is expected to be represented in a format matching to the [W3C Baggage HTTP Header Content Format],
|
||||||
|
except that additional semi-colon delimited metadata is not supported.
|
||||||
|
Example value: "key1=value1,key2=value2".
|
||||||
|
OTEL_EXPORTER_OTLP_TRACES_HEADERS takes precedence over OTEL_EXPORTER_OTLP_HEADERS.
|
||||||
|
The configuration can be overridden by [WithHeaders] option.
|
||||||
|
|
||||||
|
OTEL_EXPORTER_OTLP_TIMEOUT, OTEL_EXPORTER_OTLP_TRACES_TIMEOUT (default: "10000") -
|
||||||
|
maximum time in milliseconds the OTLP exporter waits for each batch export.
|
||||||
|
OTEL_EXPORTER_OTLP_TRACES_TIMEOUT takes precedence over OTEL_EXPORTER_OTLP_TIMEOUT.
|
||||||
|
The configuration can be overridden by [WithTimeout] option.
|
||||||
|
|
||||||
|
OTEL_EXPORTER_OTLP_COMPRESSION, OTEL_EXPORTER_OTLP_TRACES_COMPRESSION (default: none) -
|
||||||
|
the gRPC compressor the exporter uses.
|
||||||
|
Supported value: "gzip".
|
||||||
|
OTEL_EXPORTER_OTLP_TRACES_COMPRESSION takes precedence over OTEL_EXPORTER_OTLP_COMPRESSION.
|
||||||
|
The configuration can be overridden by [WithCompressor], [WithGRPCConn] options.
|
||||||
|
|
||||||
|
OTEL_EXPORTER_OTLP_CERTIFICATE, OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE (default: none) -
|
||||||
|
the filepath to the trusted certificate to use when verifying a server's TLS credentials.
|
||||||
|
OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE takes precedence over OTEL_EXPORTER_OTLP_CERTIFICATE.
|
||||||
|
The configuration can be overridden by [WithTLSCredentials], [WithGRPCConn] options.
|
||||||
|
|
||||||
|
OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE, OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE (default: none) -
|
||||||
|
the filepath to the client certificate/chain trust for clients private key to use in mTLS communication in PEM format.
|
||||||
|
OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE takes precedence over OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE.
|
||||||
|
The configuration can be overridden by [WithTLSCredentials], [WithGRPCConn] options.
|
||||||
|
|
||||||
|
OTEL_EXPORTER_OTLP_CLIENT_KEY, OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY (default: none) -
|
||||||
|
the filepath to the clients private key to use in mTLS communication in PEM format.
|
||||||
|
OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY takes precedence over OTEL_EXPORTER_OTLP_CLIENT_KEY.
|
||||||
|
The configuration can be overridden by [WithTLSCredentials], [WithGRPCConn] option.
|
||||||
|
|
||||||
|
[W3C Baggage HTTP Header Content Format]: https://www.w3.org/TR/baggage/#header-content
|
||||||
|
*/
|
||||||
|
package otlptracegrpc // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"
|
@ -174,13 +174,13 @@ func stringToHeader(value string) map[string]string {
|
|||||||
global.Error(errors.New("missing '="), "parse headers", "input", header)
|
global.Error(errors.New("missing '="), "parse headers", "input", header)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
name, err := url.QueryUnescape(n)
|
name, err := url.PathUnescape(n)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
global.Error(err, "escape header key", "key", n)
|
global.Error(err, "escape header key", "key", n)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
trimmedName := strings.TrimSpace(name)
|
trimmedName := strings.TrimSpace(name)
|
||||||
value, err := url.QueryUnescape(v)
|
value, err := url.PathUnescape(v)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
global.Error(err, "escape header value", "value", v)
|
global.Error(err, "escape header value", "value", v)
|
||||||
continue
|
continue
|
||||||
|
@ -20,6 +20,7 @@ package otlpconfig // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/
|
|||||||
import (
|
import (
|
||||||
"crypto/tls"
|
"crypto/tls"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"net/url"
|
||||||
"path"
|
"path"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
@ -32,6 +33,7 @@ import (
|
|||||||
|
|
||||||
"go.opentelemetry.io/otel/exporters/otlp/otlptrace"
|
"go.opentelemetry.io/otel/exporters/otlp/otlptrace"
|
||||||
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/retry"
|
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/retry"
|
||||||
|
"go.opentelemetry.io/otel/internal/global"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -141,9 +143,6 @@ func NewGRPCConfig(opts ...GRPCOption) Config {
|
|||||||
if cfg.Traces.Compression == GzipCompression {
|
if cfg.Traces.Compression == GzipCompression {
|
||||||
cfg.DialOptions = append(cfg.DialOptions, grpc.WithDefaultCallOptions(grpc.UseCompressor(gzip.Name)))
|
cfg.DialOptions = append(cfg.DialOptions, grpc.WithDefaultCallOptions(grpc.UseCompressor(gzip.Name)))
|
||||||
}
|
}
|
||||||
if len(cfg.DialOptions) != 0 {
|
|
||||||
cfg.DialOptions = append(cfg.DialOptions, cfg.DialOptions...)
|
|
||||||
}
|
|
||||||
if cfg.ReconnectionPeriod != 0 {
|
if cfg.ReconnectionPeriod != 0 {
|
||||||
p := grpc.ConnectParams{
|
p := grpc.ConnectParams{
|
||||||
Backoff: backoff.DefaultConfig,
|
Backoff: backoff.DefaultConfig,
|
||||||
@ -268,6 +267,24 @@ func WithEndpoint(endpoint string) GenericOption {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func WithEndpointURL(v string) GenericOption {
|
||||||
|
return newGenericOption(func(cfg Config) Config {
|
||||||
|
u, err := url.Parse(v)
|
||||||
|
if err != nil {
|
||||||
|
global.Error(err, "otlptrace: parse endpoint url", "url", v)
|
||||||
|
return cfg
|
||||||
|
}
|
||||||
|
|
||||||
|
cfg.Traces.Endpoint = u.Host
|
||||||
|
cfg.Traces.URLPath = u.Path
|
||||||
|
if u.Scheme != "https" {
|
||||||
|
cfg.Traces.Insecure = true
|
||||||
|
}
|
||||||
|
|
||||||
|
return cfg
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
func WithCompression(compression Compression) GenericOption {
|
func WithCompression(compression Compression) GenericOption {
|
||||||
return newGenericOption(func(cfg Config) Config {
|
return newGenericOption(func(cfg Config) Config {
|
||||||
cfg.Traces.Compression = compression
|
cfg.Traces.Compression = compression
|
||||||
|
42
vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/options.go
generated
vendored
42
vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/options.go
generated
vendored
@ -64,14 +64,44 @@ func WithInsecure() Option {
|
|||||||
return wrappedOption{otlpconfig.WithInsecure()}
|
return wrappedOption{otlpconfig.WithInsecure()}
|
||||||
}
|
}
|
||||||
|
|
||||||
// WithEndpoint sets the target endpoint the exporter will connect to. If
|
// WithEndpointURL sets the target endpoint URL the Exporter will connect to.
|
||||||
// unset, localhost:4317 will be used as a default.
|
//
|
||||||
|
// If the OTEL_EXPORTER_OTLP_ENDPOINT or OTEL_EXPORTER_OTLP_METRICS_ENDPOINT
|
||||||
|
// environment variable is set, and this option is not passed, that variable
|
||||||
|
// value will be used. If both are set, OTEL_EXPORTER_OTLP_TRACES_ENDPOINT
|
||||||
|
// will take precedence.
|
||||||
|
//
|
||||||
|
// If both this option and WithEndpointURL are used, the last used option will
|
||||||
|
// take precedence.
|
||||||
|
//
|
||||||
|
// By default, if an environment variable is not set, and this option is not
|
||||||
|
// passed, "localhost:4317" will be used.
|
||||||
//
|
//
|
||||||
// This option has no effect if WithGRPCConn is used.
|
// This option has no effect if WithGRPCConn is used.
|
||||||
func WithEndpoint(endpoint string) Option {
|
func WithEndpoint(endpoint string) Option {
|
||||||
return wrappedOption{otlpconfig.WithEndpoint(endpoint)}
|
return wrappedOption{otlpconfig.WithEndpoint(endpoint)}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// WithEndpoint sets the target endpoint URL the Exporter will connect to.
|
||||||
|
//
|
||||||
|
// If the OTEL_EXPORTER_OTLP_ENDPOINT or OTEL_EXPORTER_OTLP_METRICS_ENDPOINT
|
||||||
|
// environment variable is set, and this option is not passed, that variable
|
||||||
|
// value will be used. If both are set, OTEL_EXPORTER_OTLP_TRACES_ENDPOINT
|
||||||
|
// will take precedence.
|
||||||
|
//
|
||||||
|
// If both this option and WithEndpoint are used, the last used option will
|
||||||
|
// take precedence.
|
||||||
|
//
|
||||||
|
// If an invalid URL is provided, the default value will be kept.
|
||||||
|
//
|
||||||
|
// By default, if an environment variable is not set, and this option is not
|
||||||
|
// passed, "localhost:4317" will be used.
|
||||||
|
//
|
||||||
|
// This option has no effect if WithGRPCConn is used.
|
||||||
|
func WithEndpointURL(u string) Option {
|
||||||
|
return wrappedOption{otlpconfig.WithEndpointURL(u)}
|
||||||
|
}
|
||||||
|
|
||||||
// WithReconnectionPeriod set the minimum amount of time between connection
|
// WithReconnectionPeriod set the minimum amount of time between connection
|
||||||
// attempts to the target endpoint.
|
// attempts to the target endpoint.
|
||||||
//
|
//
|
||||||
@ -93,13 +123,7 @@ func compressorToCompression(compressor string) otlpconfig.Compression {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// WithCompressor sets the compressor for the gRPC client to use when sending
|
// WithCompressor sets the compressor for the gRPC client to use when sending
|
||||||
// requests. It is the responsibility of the caller to ensure that the
|
// requests. Supported compressor values: "gzip".
|
||||||
// compressor set has been registered with google.golang.org/grpc/encoding.
|
|
||||||
// This can be done by encoding.RegisterCompressor. Some compressors
|
|
||||||
// auto-register on import, such as gzip, which can be registered by calling
|
|
||||||
// `import _ "google.golang.org/grpc/encoding/gzip"`.
|
|
||||||
//
|
|
||||||
// This option has no effect if WithGRPCConn is used.
|
|
||||||
func WithCompressor(compressor string) Option {
|
func WithCompressor(compressor string) Option {
|
||||||
return wrappedOption{otlpconfig.WithCompression(compressorToCompression(compressor))}
|
return wrappedOption{otlpconfig.WithCompression(compressorToCompression(compressor))}
|
||||||
}
|
}
|
||||||
|
15
vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/client.go
generated
vendored
15
vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/client.go
generated
vendored
@ -18,6 +18,7 @@ import (
|
|||||||
"bytes"
|
"bytes"
|
||||||
"compress/gzip"
|
"compress/gzip"
|
||||||
"context"
|
"context"
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"net"
|
"net"
|
||||||
@ -152,6 +153,10 @@ func (d *client) UploadTraces(ctx context.Context, protoSpans []*tracepb.Resourc
|
|||||||
|
|
||||||
request.reset(ctx)
|
request.reset(ctx)
|
||||||
resp, err := d.client.Do(request.Request)
|
resp, err := d.client.Do(request.Request)
|
||||||
|
var urlErr *url.Error
|
||||||
|
if errors.As(err, &urlErr) && urlErr.Temporary() {
|
||||||
|
return newResponseError(http.Header{})
|
||||||
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@ -172,8 +177,11 @@ func (d *client) UploadTraces(ctx context.Context, protoSpans []*tracepb.Resourc
|
|||||||
if _, err := io.Copy(&respData, resp.Body); err != nil {
|
if _, err := io.Copy(&respData, resp.Body); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
if respData.Len() == 0 {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
if respData.Len() != 0 {
|
if resp.Header.Get("Content-Type") == "application/x-protobuf" {
|
||||||
var respProto coltracepb.ExportTraceServiceResponse
|
var respProto coltracepb.ExportTraceServiceResponse
|
||||||
if err := proto.Unmarshal(respData.Bytes(), &respProto); err != nil {
|
if err := proto.Unmarshal(respData.Bytes(), &respProto); err != nil {
|
||||||
return err
|
return err
|
||||||
@ -190,7 +198,10 @@ func (d *client) UploadTraces(ctx context.Context, protoSpans []*tracepb.Resourc
|
|||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
|
||||||
case sc == http.StatusTooManyRequests, sc == http.StatusServiceUnavailable:
|
case sc == http.StatusTooManyRequests,
|
||||||
|
sc == http.StatusBadGateway,
|
||||||
|
sc == http.StatusServiceUnavailable,
|
||||||
|
sc == http.StatusGatewayTimeout:
|
||||||
// Retry-able failures. Drain the body to reuse the connection.
|
// Retry-able failures. Drain the body to reuse the connection.
|
||||||
if _, err := io.Copy(io.Discard, resp.Body); err != nil {
|
if _, err := io.Copy(io.Discard, resp.Body); err != nil {
|
||||||
otel.Handle(err)
|
otel.Handle(err)
|
||||||
|
59
vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/doc.go
generated
vendored
59
vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/doc.go
generated
vendored
@ -13,7 +13,62 @@
|
|||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Package otlptracehttp a client that sends traces to the collector using HTTP
|
Package otlptracehttp provides an OTLP span exporter using HTTP with protobuf payloads.
|
||||||
with binary protobuf payloads.
|
By default the telemetry is sent to https://localhost:4318/v1/traces.
|
||||||
|
|
||||||
|
Exporter should be created using [New].
|
||||||
|
|
||||||
|
The environment variables described below can be used for configuration.
|
||||||
|
|
||||||
|
OTEL_EXPORTER_OTLP_ENDPOINT (default: "https://localhost:4318") -
|
||||||
|
target base URL ("/v1/traces" is appended) to which the exporter sends telemetry.
|
||||||
|
The value must contain a scheme ("http" or "https") and host.
|
||||||
|
The value may additionally contain a port and a path.
|
||||||
|
The value should not contain a query string or fragment.
|
||||||
|
The configuration can be overridden by OTEL_EXPORTER_OTLP_TRACES_ENDPOINT
|
||||||
|
environment variable and by [WithEndpoint], [WithEndpointURL], [WithInsecure] options.
|
||||||
|
|
||||||
|
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT (default: "https://localhost:4318/v1/traces") -
|
||||||
|
target URL to which the exporter sends telemetry.
|
||||||
|
The value must contain a scheme ("http" or "https") and host.
|
||||||
|
The value may additionally contain a port and a path.
|
||||||
|
The value should not contain a query string or fragment.
|
||||||
|
The configuration can be overridden by [WithEndpoint], [WithEndpointURL], [WitnInsecure], and [WithURLPath] options.
|
||||||
|
|
||||||
|
OTEL_EXPORTER_OTLP_HEADERS, OTEL_EXPORTER_OTLP_TRACES_HEADERS (default: none) -
|
||||||
|
key-value pairs used as headers associated with HTTP requests.
|
||||||
|
The value is expected to be represented in a format matching to the [W3C Baggage HTTP Header Content Format],
|
||||||
|
except that additional semi-colon delimited metadata is not supported.
|
||||||
|
Example value: "key1=value1,key2=value2".
|
||||||
|
OTEL_EXPORTER_OTLP_TRACES_HEADERS takes precedence over OTEL_EXPORTER_OTLP_HEADERS.
|
||||||
|
The configuration can be overridden by [WithHeaders] option.
|
||||||
|
|
||||||
|
OTEL_EXPORTER_OTLP_TIMEOUT, OTEL_EXPORTER_OTLP_TRACES_TIMEOUT (default: "10000") -
|
||||||
|
maximum time in milliseconds the OTLP exporter waits for each batch export.
|
||||||
|
OTEL_EXPORTER_OTLP_TRACES_TIMEOUT takes precedence over OTEL_EXPORTER_OTLP_TIMEOUT.
|
||||||
|
The configuration can be overridden by [WithTimeout] option.
|
||||||
|
|
||||||
|
OTEL_EXPORTER_OTLP_COMPRESSION, OTEL_EXPORTER_OTLP_TRACES_COMPRESSION (default: none) -
|
||||||
|
the compression strategy the exporter uses to compress the HTTP body.
|
||||||
|
Supported value: "gzip".
|
||||||
|
OTEL_EXPORTER_OTLP_TRACES_COMPRESSION takes precedence over OTEL_EXPORTER_OTLP_COMPRESSION.
|
||||||
|
The configuration can be overridden by [WithCompression] option.
|
||||||
|
|
||||||
|
OTEL_EXPORTER_OTLP_CERTIFICATE, OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE (default: none) -
|
||||||
|
the filepath to the trusted certificate to use when verifying a server's TLS credentials.
|
||||||
|
OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE takes precedence over OTEL_EXPORTER_OTLP_CERTIFICATE.
|
||||||
|
The configuration can be overridden by [WithTLSClientConfig] option.
|
||||||
|
|
||||||
|
OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE, OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE (default: none) -
|
||||||
|
the filepath to the client certificate/chain trust for clients private key to use in mTLS communication in PEM format.
|
||||||
|
OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE takes precedence over OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE.
|
||||||
|
The configuration can be overridden by [WithTLSClientConfig] option.
|
||||||
|
|
||||||
|
OTEL_EXPORTER_OTLP_CLIENT_KEY, OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY (default: none) -
|
||||||
|
the filepath to the clients private key to use in mTLS communication in PEM format.
|
||||||
|
OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY takes precedence over OTEL_EXPORTER_OTLP_CLIENT_KEY.
|
||||||
|
The configuration can be overridden by [WithTLSClientConfig] option.
|
||||||
|
|
||||||
|
[W3C Baggage HTTP Header Content Format]: https://www.w3.org/TR/baggage/#header-content
|
||||||
*/
|
*/
|
||||||
package otlptracehttp // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp"
|
package otlptracehttp // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp"
|
||||||
|
@ -174,13 +174,13 @@ func stringToHeader(value string) map[string]string {
|
|||||||
global.Error(errors.New("missing '="), "parse headers", "input", header)
|
global.Error(errors.New("missing '="), "parse headers", "input", header)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
name, err := url.QueryUnescape(n)
|
name, err := url.PathUnescape(n)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
global.Error(err, "escape header key", "key", n)
|
global.Error(err, "escape header key", "key", n)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
trimmedName := strings.TrimSpace(name)
|
trimmedName := strings.TrimSpace(name)
|
||||||
value, err := url.QueryUnescape(v)
|
value, err := url.PathUnescape(v)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
global.Error(err, "escape header value", "value", v)
|
global.Error(err, "escape header value", "value", v)
|
||||||
continue
|
continue
|
||||||
|
@ -20,6 +20,7 @@ package otlpconfig // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/
|
|||||||
import (
|
import (
|
||||||
"crypto/tls"
|
"crypto/tls"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"net/url"
|
||||||
"path"
|
"path"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
@ -32,6 +33,7 @@ import (
|
|||||||
|
|
||||||
"go.opentelemetry.io/otel/exporters/otlp/otlptrace"
|
"go.opentelemetry.io/otel/exporters/otlp/otlptrace"
|
||||||
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/retry"
|
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/retry"
|
||||||
|
"go.opentelemetry.io/otel/internal/global"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -141,9 +143,6 @@ func NewGRPCConfig(opts ...GRPCOption) Config {
|
|||||||
if cfg.Traces.Compression == GzipCompression {
|
if cfg.Traces.Compression == GzipCompression {
|
||||||
cfg.DialOptions = append(cfg.DialOptions, grpc.WithDefaultCallOptions(grpc.UseCompressor(gzip.Name)))
|
cfg.DialOptions = append(cfg.DialOptions, grpc.WithDefaultCallOptions(grpc.UseCompressor(gzip.Name)))
|
||||||
}
|
}
|
||||||
if len(cfg.DialOptions) != 0 {
|
|
||||||
cfg.DialOptions = append(cfg.DialOptions, cfg.DialOptions...)
|
|
||||||
}
|
|
||||||
if cfg.ReconnectionPeriod != 0 {
|
if cfg.ReconnectionPeriod != 0 {
|
||||||
p := grpc.ConnectParams{
|
p := grpc.ConnectParams{
|
||||||
Backoff: backoff.DefaultConfig,
|
Backoff: backoff.DefaultConfig,
|
||||||
@ -268,6 +267,24 @@ func WithEndpoint(endpoint string) GenericOption {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func WithEndpointURL(v string) GenericOption {
|
||||||
|
return newGenericOption(func(cfg Config) Config {
|
||||||
|
u, err := url.Parse(v)
|
||||||
|
if err != nil {
|
||||||
|
global.Error(err, "otlptrace: parse endpoint url", "url", v)
|
||||||
|
return cfg
|
||||||
|
}
|
||||||
|
|
||||||
|
cfg.Traces.Endpoint = u.Host
|
||||||
|
cfg.Traces.URLPath = u.Path
|
||||||
|
if u.Scheme != "https" {
|
||||||
|
cfg.Traces.Insecure = true
|
||||||
|
}
|
||||||
|
|
||||||
|
return cfg
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
func WithCompression(compression Compression) GenericOption {
|
func WithCompression(compression Compression) GenericOption {
|
||||||
return newGenericOption(func(cfg Config) Config {
|
return newGenericOption(func(cfg Config) Config {
|
||||||
cfg.Traces.Compression = compression
|
cfg.Traces.Compression = compression
|
||||||
|
39
vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/options.go
generated
vendored
39
vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/options.go
generated
vendored
@ -60,15 +60,44 @@ func (w wrappedOption) applyHTTPOption(cfg otlpconfig.Config) otlpconfig.Config
|
|||||||
return w.ApplyHTTPOption(cfg)
|
return w.ApplyHTTPOption(cfg)
|
||||||
}
|
}
|
||||||
|
|
||||||
// WithEndpoint allows one to set the address of the collector
|
// WithEndpointURL sets the target endpoint URL the Exporter will connect to.
|
||||||
// endpoint that the driver will use to send spans. If
|
//
|
||||||
// unset, it will instead try to use
|
// If the OTEL_EXPORTER_OTLP_ENDPOINT or OTEL_EXPORTER_OTLP_METRICS_ENDPOINT
|
||||||
// the default endpoint (localhost:4318). Note that the endpoint
|
// environment variable is set, and this option is not passed, that variable
|
||||||
// must not contain any URL path.
|
// value will be used. If both are set, OTEL_EXPORTER_OTLP_TRACES_ENDPOINT
|
||||||
|
// will take precedence.
|
||||||
|
//
|
||||||
|
// If both this option and WithEndpointURL are used, the last used option will
|
||||||
|
// take precedence.
|
||||||
|
//
|
||||||
|
// By default, if an environment variable is not set, and this option is not
|
||||||
|
// passed, "localhost:4317" will be used.
|
||||||
|
//
|
||||||
|
// This option has no effect if WithGRPCConn is used.
|
||||||
func WithEndpoint(endpoint string) Option {
|
func WithEndpoint(endpoint string) Option {
|
||||||
return wrappedOption{otlpconfig.WithEndpoint(endpoint)}
|
return wrappedOption{otlpconfig.WithEndpoint(endpoint)}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// WithEndpoint sets the target endpoint URL the Exporter will connect to.
|
||||||
|
//
|
||||||
|
// If the OTEL_EXPORTER_OTLP_ENDPOINT or OTEL_EXPORTER_OTLP_METRICS_ENDPOINT
|
||||||
|
// environment variable is set, and this option is not passed, that variable
|
||||||
|
// value will be used. If both are set, OTEL_EXPORTER_OTLP_TRACES_ENDPOINT
|
||||||
|
// will take precedence.
|
||||||
|
//
|
||||||
|
// If both this option and WithEndpoint are used, the last used option will
|
||||||
|
// take precedence.
|
||||||
|
//
|
||||||
|
// If an invalid URL is provided, the default value will be kept.
|
||||||
|
//
|
||||||
|
// By default, if an environment variable is not set, and this option is not
|
||||||
|
// passed, "localhost:4317" will be used.
|
||||||
|
//
|
||||||
|
// This option has no effect if WithGRPCConn is used.
|
||||||
|
func WithEndpointURL(u string) Option {
|
||||||
|
return wrappedOption{otlpconfig.WithEndpointURL(u)}
|
||||||
|
}
|
||||||
|
|
||||||
// WithCompression tells the driver to compress the sent data.
|
// WithCompression tells the driver to compress the sent data.
|
||||||
func WithCompression(compression Compression) Option {
|
func WithCompression(compression Compression) Option {
|
||||||
return wrappedOption{otlpconfig.WithCompression(otlpconfig.Compression(compression))}
|
return wrappedOption{otlpconfig.WithCompression(otlpconfig.Compression(compression))}
|
||||||
|
2
vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/version.go
generated
vendored
2
vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/version.go
generated
vendored
@ -16,5 +16,5 @@ package otlptrace // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace"
|
|||||||
|
|
||||||
// Version is the current release version of the OpenTelemetry OTLP trace exporter in use.
|
// Version is the current release version of the OpenTelemetry OTLP trace exporter in use.
|
||||||
func Version() string {
|
func Version() string {
|
||||||
return "1.19.0"
|
return "1.23.1"
|
||||||
}
|
}
|
||||||
|
264
vendor/go.opentelemetry.io/otel/metric/noop/noop.go
generated
vendored
Normal file
264
vendor/go.opentelemetry.io/otel/metric/noop/noop.go
generated
vendored
Normal file
@ -0,0 +1,264 @@
|
|||||||
|
// Copyright The OpenTelemetry Authors
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
// Package noop provides an implementation of the OpenTelemetry metric API that
|
||||||
|
// produces no telemetry and minimizes used computation resources.
|
||||||
|
//
|
||||||
|
// Using this package to implement the OpenTelemetry metric API will
|
||||||
|
// effectively disable OpenTelemetry.
|
||||||
|
//
|
||||||
|
// This implementation can be embedded in other implementations of the
|
||||||
|
// OpenTelemetry metric API. Doing so will mean the implementation defaults to
|
||||||
|
// no operation for methods it does not implement.
|
||||||
|
package noop // import "go.opentelemetry.io/otel/metric/noop"
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
"go.opentelemetry.io/otel/metric"
|
||||||
|
"go.opentelemetry.io/otel/metric/embedded"
|
||||||
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
// Compile-time check this implements the OpenTelemetry API.
|
||||||
|
|
||||||
|
_ metric.MeterProvider = MeterProvider{}
|
||||||
|
_ metric.Meter = Meter{}
|
||||||
|
_ metric.Observer = Observer{}
|
||||||
|
_ metric.Registration = Registration{}
|
||||||
|
_ metric.Int64Counter = Int64Counter{}
|
||||||
|
_ metric.Float64Counter = Float64Counter{}
|
||||||
|
_ metric.Int64UpDownCounter = Int64UpDownCounter{}
|
||||||
|
_ metric.Float64UpDownCounter = Float64UpDownCounter{}
|
||||||
|
_ metric.Int64Histogram = Int64Histogram{}
|
||||||
|
_ metric.Float64Histogram = Float64Histogram{}
|
||||||
|
_ metric.Int64ObservableCounter = Int64ObservableCounter{}
|
||||||
|
_ metric.Float64ObservableCounter = Float64ObservableCounter{}
|
||||||
|
_ metric.Int64ObservableGauge = Int64ObservableGauge{}
|
||||||
|
_ metric.Float64ObservableGauge = Float64ObservableGauge{}
|
||||||
|
_ metric.Int64ObservableUpDownCounter = Int64ObservableUpDownCounter{}
|
||||||
|
_ metric.Float64ObservableUpDownCounter = Float64ObservableUpDownCounter{}
|
||||||
|
_ metric.Int64Observer = Int64Observer{}
|
||||||
|
_ metric.Float64Observer = Float64Observer{}
|
||||||
|
)
|
||||||
|
|
||||||
|
// MeterProvider is an OpenTelemetry No-Op MeterProvider.
|
||||||
|
type MeterProvider struct{ embedded.MeterProvider }
|
||||||
|
|
||||||
|
// NewMeterProvider returns a MeterProvider that does not record any telemetry.
|
||||||
|
func NewMeterProvider() MeterProvider {
|
||||||
|
return MeterProvider{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Meter returns an OpenTelemetry Meter that does not record any telemetry.
|
||||||
|
func (MeterProvider) Meter(string, ...metric.MeterOption) metric.Meter {
|
||||||
|
return Meter{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Meter is an OpenTelemetry No-Op Meter.
|
||||||
|
type Meter struct{ embedded.Meter }
|
||||||
|
|
||||||
|
// Int64Counter returns a Counter used to record int64 measurements that
|
||||||
|
// produces no telemetry.
|
||||||
|
func (Meter) Int64Counter(string, ...metric.Int64CounterOption) (metric.Int64Counter, error) {
|
||||||
|
return Int64Counter{}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Int64UpDownCounter returns an UpDownCounter used to record int64
|
||||||
|
// measurements that produces no telemetry.
|
||||||
|
func (Meter) Int64UpDownCounter(string, ...metric.Int64UpDownCounterOption) (metric.Int64UpDownCounter, error) {
|
||||||
|
return Int64UpDownCounter{}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Int64Histogram returns a Histogram used to record int64 measurements that
|
||||||
|
// produces no telemetry.
|
||||||
|
func (Meter) Int64Histogram(string, ...metric.Int64HistogramOption) (metric.Int64Histogram, error) {
|
||||||
|
return Int64Histogram{}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Int64ObservableCounter returns an ObservableCounter used to record int64
|
||||||
|
// measurements that produces no telemetry.
|
||||||
|
func (Meter) Int64ObservableCounter(string, ...metric.Int64ObservableCounterOption) (metric.Int64ObservableCounter, error) {
|
||||||
|
return Int64ObservableCounter{}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Int64ObservableUpDownCounter returns an ObservableUpDownCounter used to
|
||||||
|
// record int64 measurements that produces no telemetry.
|
||||||
|
func (Meter) Int64ObservableUpDownCounter(string, ...metric.Int64ObservableUpDownCounterOption) (metric.Int64ObservableUpDownCounter, error) {
|
||||||
|
return Int64ObservableUpDownCounter{}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Int64ObservableGauge returns an ObservableGauge used to record int64
|
||||||
|
// measurements that produces no telemetry.
|
||||||
|
func (Meter) Int64ObservableGauge(string, ...metric.Int64ObservableGaugeOption) (metric.Int64ObservableGauge, error) {
|
||||||
|
return Int64ObservableGauge{}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Float64Counter returns a Counter used to record int64 measurements that
|
||||||
|
// produces no telemetry.
|
||||||
|
func (Meter) Float64Counter(string, ...metric.Float64CounterOption) (metric.Float64Counter, error) {
|
||||||
|
return Float64Counter{}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Float64UpDownCounter returns an UpDownCounter used to record int64
|
||||||
|
// measurements that produces no telemetry.
|
||||||
|
func (Meter) Float64UpDownCounter(string, ...metric.Float64UpDownCounterOption) (metric.Float64UpDownCounter, error) {
|
||||||
|
return Float64UpDownCounter{}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Float64Histogram returns a Histogram used to record int64 measurements that
|
||||||
|
// produces no telemetry.
|
||||||
|
func (Meter) Float64Histogram(string, ...metric.Float64HistogramOption) (metric.Float64Histogram, error) {
|
||||||
|
return Float64Histogram{}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Float64ObservableCounter returns an ObservableCounter used to record int64
|
||||||
|
// measurements that produces no telemetry.
|
||||||
|
func (Meter) Float64ObservableCounter(string, ...metric.Float64ObservableCounterOption) (metric.Float64ObservableCounter, error) {
|
||||||
|
return Float64ObservableCounter{}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Float64ObservableUpDownCounter returns an ObservableUpDownCounter used to
|
||||||
|
// record int64 measurements that produces no telemetry.
|
||||||
|
func (Meter) Float64ObservableUpDownCounter(string, ...metric.Float64ObservableUpDownCounterOption) (metric.Float64ObservableUpDownCounter, error) {
|
||||||
|
return Float64ObservableUpDownCounter{}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Float64ObservableGauge returns an ObservableGauge used to record int64
|
||||||
|
// measurements that produces no telemetry.
|
||||||
|
func (Meter) Float64ObservableGauge(string, ...metric.Float64ObservableGaugeOption) (metric.Float64ObservableGauge, error) {
|
||||||
|
return Float64ObservableGauge{}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// RegisterCallback performs no operation.
|
||||||
|
func (Meter) RegisterCallback(metric.Callback, ...metric.Observable) (metric.Registration, error) {
|
||||||
|
return Registration{}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Observer acts as a recorder of measurements for multiple instruments in a
|
||||||
|
// Callback, it performing no operation.
|
||||||
|
type Observer struct{ embedded.Observer }
|
||||||
|
|
||||||
|
// ObserveFloat64 performs no operation.
|
||||||
|
func (Observer) ObserveFloat64(metric.Float64Observable, float64, ...metric.ObserveOption) {
|
||||||
|
}
|
||||||
|
|
||||||
|
// ObserveInt64 performs no operation.
|
||||||
|
func (Observer) ObserveInt64(metric.Int64Observable, int64, ...metric.ObserveOption) {
|
||||||
|
}
|
||||||
|
|
||||||
|
// Registration is the registration of a Callback with a No-Op Meter.
|
||||||
|
type Registration struct{ embedded.Registration }
|
||||||
|
|
||||||
|
// Unregister unregisters the Callback the Registration represents with the
|
||||||
|
// No-Op Meter. This will always return nil because the No-Op Meter performs no
|
||||||
|
// operation, including hold any record of registrations.
|
||||||
|
func (Registration) Unregister() error { return nil }
|
||||||
|
|
||||||
|
// Int64Counter is an OpenTelemetry Counter used to record int64 measurements.
|
||||||
|
// It produces no telemetry.
|
||||||
|
type Int64Counter struct{ embedded.Int64Counter }
|
||||||
|
|
||||||
|
// Add performs no operation.
|
||||||
|
func (Int64Counter) Add(context.Context, int64, ...metric.AddOption) {}
|
||||||
|
|
||||||
|
// Float64Counter is an OpenTelemetry Counter used to record float64
|
||||||
|
// measurements. It produces no telemetry.
|
||||||
|
type Float64Counter struct{ embedded.Float64Counter }
|
||||||
|
|
||||||
|
// Add performs no operation.
|
||||||
|
func (Float64Counter) Add(context.Context, float64, ...metric.AddOption) {}
|
||||||
|
|
||||||
|
// Int64UpDownCounter is an OpenTelemetry UpDownCounter used to record int64
|
||||||
|
// measurements. It produces no telemetry.
|
||||||
|
type Int64UpDownCounter struct{ embedded.Int64UpDownCounter }
|
||||||
|
|
||||||
|
// Add performs no operation.
|
||||||
|
func (Int64UpDownCounter) Add(context.Context, int64, ...metric.AddOption) {}
|
||||||
|
|
||||||
|
// Float64UpDownCounter is an OpenTelemetry UpDownCounter used to record
|
||||||
|
// float64 measurements. It produces no telemetry.
|
||||||
|
type Float64UpDownCounter struct{ embedded.Float64UpDownCounter }
|
||||||
|
|
||||||
|
// Add performs no operation.
|
||||||
|
func (Float64UpDownCounter) Add(context.Context, float64, ...metric.AddOption) {}
|
||||||
|
|
||||||
|
// Int64Histogram is an OpenTelemetry Histogram used to record int64
|
||||||
|
// measurements. It produces no telemetry.
|
||||||
|
type Int64Histogram struct{ embedded.Int64Histogram }
|
||||||
|
|
||||||
|
// Record performs no operation.
|
||||||
|
func (Int64Histogram) Record(context.Context, int64, ...metric.RecordOption) {}
|
||||||
|
|
||||||
|
// Float64Histogram is an OpenTelemetry Histogram used to record float64
|
||||||
|
// measurements. It produces no telemetry.
|
||||||
|
type Float64Histogram struct{ embedded.Float64Histogram }
|
||||||
|
|
||||||
|
// Record performs no operation.
|
||||||
|
func (Float64Histogram) Record(context.Context, float64, ...metric.RecordOption) {}
|
||||||
|
|
||||||
|
// Int64ObservableCounter is an OpenTelemetry ObservableCounter used to record
|
||||||
|
// int64 measurements. It produces no telemetry.
|
||||||
|
type Int64ObservableCounter struct {
|
||||||
|
metric.Int64Observable
|
||||||
|
embedded.Int64ObservableCounter
|
||||||
|
}
|
||||||
|
|
||||||
|
// Float64ObservableCounter is an OpenTelemetry ObservableCounter used to record
|
||||||
|
// float64 measurements. It produces no telemetry.
|
||||||
|
type Float64ObservableCounter struct {
|
||||||
|
metric.Float64Observable
|
||||||
|
embedded.Float64ObservableCounter
|
||||||
|
}
|
||||||
|
|
||||||
|
// Int64ObservableGauge is an OpenTelemetry ObservableGauge used to record
|
||||||
|
// int64 measurements. It produces no telemetry.
|
||||||
|
type Int64ObservableGauge struct {
|
||||||
|
metric.Int64Observable
|
||||||
|
embedded.Int64ObservableGauge
|
||||||
|
}
|
||||||
|
|
||||||
|
// Float64ObservableGauge is an OpenTelemetry ObservableGauge used to record
|
||||||
|
// float64 measurements. It produces no telemetry.
|
||||||
|
type Float64ObservableGauge struct {
|
||||||
|
metric.Float64Observable
|
||||||
|
embedded.Float64ObservableGauge
|
||||||
|
}
|
||||||
|
|
||||||
|
// Int64ObservableUpDownCounter is an OpenTelemetry ObservableUpDownCounter
|
||||||
|
// used to record int64 measurements. It produces no telemetry.
|
||||||
|
type Int64ObservableUpDownCounter struct {
|
||||||
|
metric.Int64Observable
|
||||||
|
embedded.Int64ObservableUpDownCounter
|
||||||
|
}
|
||||||
|
|
||||||
|
// Float64ObservableUpDownCounter is an OpenTelemetry ObservableUpDownCounter
|
||||||
|
// used to record float64 measurements. It produces no telemetry.
|
||||||
|
type Float64ObservableUpDownCounter struct {
|
||||||
|
metric.Float64Observable
|
||||||
|
embedded.Float64ObservableUpDownCounter
|
||||||
|
}
|
||||||
|
|
||||||
|
// Int64Observer is a recorder of int64 measurements that performs no operation.
|
||||||
|
type Int64Observer struct{ embedded.Int64Observer }
|
||||||
|
|
||||||
|
// Observe performs no operation.
|
||||||
|
func (Int64Observer) Observe(int64, ...metric.ObserveOption) {}
|
||||||
|
|
||||||
|
// Float64Observer is a recorder of float64 measurements that performs no
|
||||||
|
// operation.
|
||||||
|
type Float64Observer struct{ embedded.Float64Observer }
|
||||||
|
|
||||||
|
// Observe performs no operation.
|
||||||
|
func (Float64Observer) Observe(float64, ...metric.ObserveOption) {}
|
96
vendor/go.opentelemetry.io/otel/propagation/trace_context.go
generated
vendored
96
vendor/go.opentelemetry.io/otel/propagation/trace_context.go
generated
vendored
@ -18,7 +18,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"encoding/hex"
|
"encoding/hex"
|
||||||
"fmt"
|
"fmt"
|
||||||
"regexp"
|
"strings"
|
||||||
|
|
||||||
"go.opentelemetry.io/otel/trace"
|
"go.opentelemetry.io/otel/trace"
|
||||||
)
|
)
|
||||||
@ -28,6 +28,7 @@ const (
|
|||||||
maxVersion = 254
|
maxVersion = 254
|
||||||
traceparentHeader = "traceparent"
|
traceparentHeader = "traceparent"
|
||||||
tracestateHeader = "tracestate"
|
tracestateHeader = "tracestate"
|
||||||
|
delimiter = "-"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TraceContext is a propagator that supports the W3C Trace Context format
|
// TraceContext is a propagator that supports the W3C Trace Context format
|
||||||
@ -41,8 +42,8 @@ const (
|
|||||||
type TraceContext struct{}
|
type TraceContext struct{}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
_ TextMapPropagator = TraceContext{}
|
_ TextMapPropagator = TraceContext{}
|
||||||
traceCtxRegExp = regexp.MustCompile("^(?P<version>[0-9a-f]{2})-(?P<traceID>[a-f0-9]{32})-(?P<spanID>[a-f0-9]{16})-(?P<traceFlags>[a-f0-9]{2})(?:-.*)?$")
|
versionPart = fmt.Sprintf("%.2X", supportedVersion)
|
||||||
)
|
)
|
||||||
|
|
||||||
// Inject set tracecontext from the Context into the carrier.
|
// Inject set tracecontext from the Context into the carrier.
|
||||||
@ -59,12 +60,19 @@ func (tc TraceContext) Inject(ctx context.Context, carrier TextMapCarrier) {
|
|||||||
// Clear all flags other than the trace-context supported sampling bit.
|
// Clear all flags other than the trace-context supported sampling bit.
|
||||||
flags := sc.TraceFlags() & trace.FlagsSampled
|
flags := sc.TraceFlags() & trace.FlagsSampled
|
||||||
|
|
||||||
h := fmt.Sprintf("%.2x-%s-%s-%s",
|
var sb strings.Builder
|
||||||
supportedVersion,
|
sb.Grow(2 + 32 + 16 + 2 + 3)
|
||||||
sc.TraceID(),
|
_, _ = sb.WriteString(versionPart)
|
||||||
sc.SpanID(),
|
traceID := sc.TraceID()
|
||||||
flags)
|
spanID := sc.SpanID()
|
||||||
carrier.Set(traceparentHeader, h)
|
flagByte := [1]byte{byte(flags)}
|
||||||
|
var buf [32]byte
|
||||||
|
for _, src := range [][]byte{traceID[:], spanID[:], flagByte[:]} {
|
||||||
|
_ = sb.WriteByte(delimiter[0])
|
||||||
|
n := hex.Encode(buf[:], src)
|
||||||
|
_, _ = sb.Write(buf[:n])
|
||||||
|
}
|
||||||
|
carrier.Set(traceparentHeader, sb.String())
|
||||||
}
|
}
|
||||||
|
|
||||||
// Extract reads tracecontext from the carrier into a returned Context.
|
// Extract reads tracecontext from the carrier into a returned Context.
|
||||||
@ -86,21 +94,8 @@ func (tc TraceContext) extract(carrier TextMapCarrier) trace.SpanContext {
|
|||||||
return trace.SpanContext{}
|
return trace.SpanContext{}
|
||||||
}
|
}
|
||||||
|
|
||||||
matches := traceCtxRegExp.FindStringSubmatch(h)
|
var ver [1]byte
|
||||||
|
if !extractPart(ver[:], &h, 2) {
|
||||||
if len(matches) == 0 {
|
|
||||||
return trace.SpanContext{}
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(matches) < 5 { // four subgroups plus the overall match
|
|
||||||
return trace.SpanContext{}
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(matches[1]) != 2 {
|
|
||||||
return trace.SpanContext{}
|
|
||||||
}
|
|
||||||
ver, err := hex.DecodeString(matches[1])
|
|
||||||
if err != nil {
|
|
||||||
return trace.SpanContext{}
|
return trace.SpanContext{}
|
||||||
}
|
}
|
||||||
version := int(ver[0])
|
version := int(ver[0])
|
||||||
@ -108,36 +103,24 @@ func (tc TraceContext) extract(carrier TextMapCarrier) trace.SpanContext {
|
|||||||
return trace.SpanContext{}
|
return trace.SpanContext{}
|
||||||
}
|
}
|
||||||
|
|
||||||
if version == 0 && len(matches) != 5 { // four subgroups plus the overall match
|
|
||||||
return trace.SpanContext{}
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(matches[2]) != 32 {
|
|
||||||
return trace.SpanContext{}
|
|
||||||
}
|
|
||||||
|
|
||||||
var scc trace.SpanContextConfig
|
var scc trace.SpanContextConfig
|
||||||
|
if !extractPart(scc.TraceID[:], &h, 32) {
|
||||||
scc.TraceID, err = trace.TraceIDFromHex(matches[2][:32])
|
return trace.SpanContext{}
|
||||||
if err != nil {
|
}
|
||||||
|
if !extractPart(scc.SpanID[:], &h, 16) {
|
||||||
return trace.SpanContext{}
|
return trace.SpanContext{}
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(matches[3]) != 16 {
|
var opts [1]byte
|
||||||
|
if !extractPart(opts[:], &h, 2) {
|
||||||
return trace.SpanContext{}
|
return trace.SpanContext{}
|
||||||
}
|
}
|
||||||
scc.SpanID, err = trace.SpanIDFromHex(matches[3])
|
if version == 0 && (h != "" || opts[0] > 2) {
|
||||||
if err != nil {
|
// version 0 not allow extra
|
||||||
|
// version 0 not allow other flag
|
||||||
return trace.SpanContext{}
|
return trace.SpanContext{}
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(matches[4]) != 2 {
|
|
||||||
return trace.SpanContext{}
|
|
||||||
}
|
|
||||||
opts, err := hex.DecodeString(matches[4])
|
|
||||||
if err != nil || len(opts) < 1 || (version == 0 && opts[0] > 2) {
|
|
||||||
return trace.SpanContext{}
|
|
||||||
}
|
|
||||||
// Clear all flags other than the trace-context supported sampling bit.
|
// Clear all flags other than the trace-context supported sampling bit.
|
||||||
scc.TraceFlags = trace.TraceFlags(opts[0]) & trace.FlagsSampled
|
scc.TraceFlags = trace.TraceFlags(opts[0]) & trace.FlagsSampled
|
||||||
|
|
||||||
@ -155,6 +138,29 @@ func (tc TraceContext) extract(carrier TextMapCarrier) trace.SpanContext {
|
|||||||
return sc
|
return sc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// upperHex detect hex is upper case Unicode characters.
|
||||||
|
func upperHex(v string) bool {
|
||||||
|
for _, c := range v {
|
||||||
|
if c >= 'A' && c <= 'F' {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
func extractPart(dst []byte, h *string, n int) bool {
|
||||||
|
part, left, _ := strings.Cut(*h, delimiter)
|
||||||
|
*h = left
|
||||||
|
// hex.Decode decodes unsupported upper-case characters, so exclude explicitly.
|
||||||
|
if len(part) != n || upperHex(part) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
if p, err := hex.Decode(dst, []byte(part)); err != nil || p != n/2 {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
// Fields returns the keys who's values are set with Inject.
|
// Fields returns the keys who's values are set with Inject.
|
||||||
func (tc TraceContext) Fields() []string {
|
func (tc TraceContext) Fields() []string {
|
||||||
return []string{traceparentHeader, tracestateHeader}
|
return []string{traceparentHeader, tracestateHeader}
|
||||||
|
25
vendor/go.opentelemetry.io/otel/sdk/resource/auto.go
generated
vendored
25
vendor/go.opentelemetry.io/otel/sdk/resource/auto.go
generated
vendored
@ -41,8 +41,20 @@ type Detector interface {
|
|||||||
// must never be done outside of a new major release.
|
// must never be done outside of a new major release.
|
||||||
}
|
}
|
||||||
|
|
||||||
// Detect calls all input detectors sequentially and merges each result with the previous one.
|
// Detect returns a new [Resource] merged from all the Resources each of the
|
||||||
// It returns the merged error too.
|
// detectors produces. Each of the detectors are called sequentially, in the
|
||||||
|
// order they are passed, merging the produced resource into the previous.
|
||||||
|
//
|
||||||
|
// This may return a partial Resource along with an error containing
|
||||||
|
// [ErrPartialResource] if that error is returned from a detector. It may also
|
||||||
|
// return a merge-conflicting Resource along with an error containing
|
||||||
|
// [ErrSchemaURLConflict] if merging Resources from different detectors results
|
||||||
|
// in a schema URL conflict. It is up to the caller to determine if this
|
||||||
|
// returned Resource should be used or not.
|
||||||
|
//
|
||||||
|
// If one of the detectors returns an error that is not [ErrPartialResource],
|
||||||
|
// the resource produced by the detector will not be merged and the returned
|
||||||
|
// error will wrap that detector's error.
|
||||||
func Detect(ctx context.Context, detectors ...Detector) (*Resource, error) {
|
func Detect(ctx context.Context, detectors ...Detector) (*Resource, error) {
|
||||||
r := new(Resource)
|
r := new(Resource)
|
||||||
return r, detect(ctx, r, detectors)
|
return r, detect(ctx, r, detectors)
|
||||||
@ -50,6 +62,10 @@ func Detect(ctx context.Context, detectors ...Detector) (*Resource, error) {
|
|||||||
|
|
||||||
// detect runs all detectors using ctx and merges the result into res. This
|
// detect runs all detectors using ctx and merges the result into res. This
|
||||||
// assumes res is allocated and not nil, it will panic otherwise.
|
// assumes res is allocated and not nil, it will panic otherwise.
|
||||||
|
//
|
||||||
|
// If the detectors or merging resources produces any errors (i.e.
|
||||||
|
// [ErrPartialResource] [ErrSchemaURLConflict]), a single error wrapping all of
|
||||||
|
// these errors will be returned. Otherwise, nil is returned.
|
||||||
func detect(ctx context.Context, res *Resource, detectors []Detector) error {
|
func detect(ctx context.Context, res *Resource, detectors []Detector) error {
|
||||||
var (
|
var (
|
||||||
r *Resource
|
r *Resource
|
||||||
@ -78,6 +94,11 @@ func detect(ctx context.Context, res *Resource, detectors []Detector) error {
|
|||||||
if len(errs) == 0 {
|
if len(errs) == 0 {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
if errors.Is(errs, ErrSchemaURLConflict) {
|
||||||
|
// If there has been a merge conflict, ensure the resource has no
|
||||||
|
// schema URL.
|
||||||
|
res.schemaURL = ""
|
||||||
|
}
|
||||||
return errs
|
return errs
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
vendor/go.opentelemetry.io/otel/sdk/resource/builtin.go
generated
vendored
2
vendor/go.opentelemetry.io/otel/sdk/resource/builtin.go
generated
vendored
@ -22,7 +22,7 @@ import (
|
|||||||
|
|
||||||
"go.opentelemetry.io/otel/attribute"
|
"go.opentelemetry.io/otel/attribute"
|
||||||
"go.opentelemetry.io/otel/sdk"
|
"go.opentelemetry.io/otel/sdk"
|
||||||
semconv "go.opentelemetry.io/otel/semconv/v1.21.0"
|
semconv "go.opentelemetry.io/otel/semconv/v1.24.0"
|
||||||
)
|
)
|
||||||
|
|
||||||
type (
|
type (
|
||||||
|
4
vendor/go.opentelemetry.io/otel/sdk/resource/container.go
generated
vendored
4
vendor/go.opentelemetry.io/otel/sdk/resource/container.go
generated
vendored
@ -22,14 +22,14 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"regexp"
|
"regexp"
|
||||||
|
|
||||||
semconv "go.opentelemetry.io/otel/semconv/v1.21.0"
|
semconv "go.opentelemetry.io/otel/semconv/v1.24.0"
|
||||||
)
|
)
|
||||||
|
|
||||||
type containerIDProvider func() (string, error)
|
type containerIDProvider func() (string, error)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
containerID containerIDProvider = getContainerIDFromCGroup
|
containerID containerIDProvider = getContainerIDFromCGroup
|
||||||
cgroupContainerIDRe = regexp.MustCompile(`^.*/(?:.*-)?([0-9a-f]+)(?:\.|\s*$)`)
|
cgroupContainerIDRe = regexp.MustCompile(`^.*/(?:.*[-:])?([0-9a-f]+)(?:\.|\s*$)`)
|
||||||
)
|
)
|
||||||
|
|
||||||
type cgroupContainerIDDetector struct{}
|
type cgroupContainerIDDetector struct{}
|
||||||
|
2
vendor/go.opentelemetry.io/otel/sdk/resource/env.go
generated
vendored
2
vendor/go.opentelemetry.io/otel/sdk/resource/env.go
generated
vendored
@ -23,7 +23,7 @@ import (
|
|||||||
|
|
||||||
"go.opentelemetry.io/otel"
|
"go.opentelemetry.io/otel"
|
||||||
"go.opentelemetry.io/otel/attribute"
|
"go.opentelemetry.io/otel/attribute"
|
||||||
semconv "go.opentelemetry.io/otel/semconv/v1.21.0"
|
semconv "go.opentelemetry.io/otel/semconv/v1.24.0"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
2
vendor/go.opentelemetry.io/otel/sdk/resource/host_id.go
generated
vendored
2
vendor/go.opentelemetry.io/otel/sdk/resource/host_id.go
generated
vendored
@ -19,7 +19,7 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
semconv "go.opentelemetry.io/otel/semconv/v1.21.0"
|
semconv "go.opentelemetry.io/otel/semconv/v1.24.0"
|
||||||
)
|
)
|
||||||
|
|
||||||
type hostIDProvider func() (string, error)
|
type hostIDProvider func() (string, error)
|
||||||
|
2
vendor/go.opentelemetry.io/otel/sdk/resource/os.go
generated
vendored
2
vendor/go.opentelemetry.io/otel/sdk/resource/os.go
generated
vendored
@ -19,7 +19,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"go.opentelemetry.io/otel/attribute"
|
"go.opentelemetry.io/otel/attribute"
|
||||||
semconv "go.opentelemetry.io/otel/semconv/v1.21.0"
|
semconv "go.opentelemetry.io/otel/semconv/v1.24.0"
|
||||||
)
|
)
|
||||||
|
|
||||||
type osDescriptionProvider func() (string, error)
|
type osDescriptionProvider func() (string, error)
|
||||||
|
2
vendor/go.opentelemetry.io/otel/sdk/resource/process.go
generated
vendored
2
vendor/go.opentelemetry.io/otel/sdk/resource/process.go
generated
vendored
@ -22,7 +22,7 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"runtime"
|
"runtime"
|
||||||
|
|
||||||
semconv "go.opentelemetry.io/otel/semconv/v1.21.0"
|
semconv "go.opentelemetry.io/otel/semconv/v1.24.0"
|
||||||
)
|
)
|
||||||
|
|
||||||
type (
|
type (
|
||||||
|
79
vendor/go.opentelemetry.io/otel/sdk/resource/resource.go
generated
vendored
79
vendor/go.opentelemetry.io/otel/sdk/resource/resource.go
generated
vendored
@ -17,6 +17,7 @@ package resource // import "go.opentelemetry.io/otel/sdk/resource"
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
|
"fmt"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"go.opentelemetry.io/otel"
|
"go.opentelemetry.io/otel"
|
||||||
@ -40,9 +41,20 @@ var (
|
|||||||
defaultResourceOnce sync.Once
|
defaultResourceOnce sync.Once
|
||||||
)
|
)
|
||||||
|
|
||||||
var errMergeConflictSchemaURL = errors.New("cannot merge resource due to conflicting Schema URL")
|
// ErrSchemaURLConflict is an error returned when two Resources are merged
|
||||||
|
// together that contain different, non-empty, schema URLs.
|
||||||
|
var ErrSchemaURLConflict = errors.New("conflicting Schema URL")
|
||||||
|
|
||||||
// New returns a Resource combined from the user-provided detectors.
|
// New returns a [Resource] built using opts.
|
||||||
|
//
|
||||||
|
// This may return a partial Resource along with an error containing
|
||||||
|
// [ErrPartialResource] if options that provide a [Detector] are used and that
|
||||||
|
// error is returned from one or more of the Detectors. It may also return a
|
||||||
|
// merge-conflict Resource along with an error containing
|
||||||
|
// [ErrSchemaURLConflict] if merging Resources from the opts results in a
|
||||||
|
// schema URL conflict (see [Resource.Merge] for more information). It is up to
|
||||||
|
// the caller to determine if this returned Resource should be used or not
|
||||||
|
// based on these errors.
|
||||||
func New(ctx context.Context, opts ...Option) (*Resource, error) {
|
func New(ctx context.Context, opts ...Option) (*Resource, error) {
|
||||||
cfg := config{}
|
cfg := config{}
|
||||||
for _, opt := range opts {
|
for _, opt := range opts {
|
||||||
@ -98,7 +110,7 @@ func (r *Resource) String() string {
|
|||||||
return r.attrs.Encoded(attribute.DefaultEncoder())
|
return r.attrs.Encoded(attribute.DefaultEncoder())
|
||||||
}
|
}
|
||||||
|
|
||||||
// MarshalLog is the marshaling function used by the logging system to represent this exporter.
|
// MarshalLog is the marshaling function used by the logging system to represent this Resource.
|
||||||
func (r *Resource) MarshalLog() interface{} {
|
func (r *Resource) MarshalLog() interface{} {
|
||||||
return struct {
|
return struct {
|
||||||
Attributes attribute.Set
|
Attributes attribute.Set
|
||||||
@ -146,16 +158,29 @@ func (r *Resource) Equal(eq *Resource) bool {
|
|||||||
return r.Equivalent() == eq.Equivalent()
|
return r.Equivalent() == eq.Equivalent()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Merge creates a new resource by combining resource a and b.
|
// Merge creates a new [Resource] by merging a and b.
|
||||||
//
|
//
|
||||||
// If there are common keys between resource a and b, then the value
|
// If there are common keys between a and b, then the value from b will
|
||||||
// from resource b will overwrite the value from resource a, even
|
// overwrite the value from a, even if b's value is empty.
|
||||||
// if resource b's value is empty.
|
|
||||||
//
|
//
|
||||||
// The SchemaURL of the resources will be merged according to the spec rules:
|
// The SchemaURL of the resources will be merged according to the
|
||||||
// https://github.com/open-telemetry/opentelemetry-specification/blob/v1.20.0/specification/resource/sdk.md#merge
|
// [OpenTelemetry specification rules]:
|
||||||
// If the resources have different non-empty schemaURL an empty resource and an error
|
//
|
||||||
// will be returned.
|
// - If a's schema URL is empty then the returned Resource's schema URL will
|
||||||
|
// be set to the schema URL of b,
|
||||||
|
// - Else if b's schema URL is empty then the returned Resource's schema URL
|
||||||
|
// will be set to the schema URL of a,
|
||||||
|
// - Else if the schema URLs of a and b are the same then that will be the
|
||||||
|
// schema URL of the returned Resource,
|
||||||
|
// - Else this is a merging error. If the resources have different,
|
||||||
|
// non-empty, schema URLs an error containing [ErrSchemaURLConflict] will
|
||||||
|
// be returned with the merged Resource. The merged Resource will have an
|
||||||
|
// empty schema URL. It may be the case that some unintended attributes
|
||||||
|
// have been overwritten or old semantic conventions persisted in the
|
||||||
|
// returned Resource. It is up to the caller to determine if this returned
|
||||||
|
// Resource should be used or not.
|
||||||
|
//
|
||||||
|
// [OpenTelemetry specification rules]: https://github.com/open-telemetry/opentelemetry-specification/blob/v1.20.0/specification/resource/sdk.md#merge
|
||||||
func Merge(a, b *Resource) (*Resource, error) {
|
func Merge(a, b *Resource) (*Resource, error) {
|
||||||
if a == nil && b == nil {
|
if a == nil && b == nil {
|
||||||
return Empty(), nil
|
return Empty(), nil
|
||||||
@ -167,19 +192,6 @@ func Merge(a, b *Resource) (*Resource, error) {
|
|||||||
return a, nil
|
return a, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Merge the schema URL.
|
|
||||||
var schemaURL string
|
|
||||||
switch true {
|
|
||||||
case a.schemaURL == "":
|
|
||||||
schemaURL = b.schemaURL
|
|
||||||
case b.schemaURL == "":
|
|
||||||
schemaURL = a.schemaURL
|
|
||||||
case a.schemaURL == b.schemaURL:
|
|
||||||
schemaURL = a.schemaURL
|
|
||||||
default:
|
|
||||||
return Empty(), errMergeConflictSchemaURL
|
|
||||||
}
|
|
||||||
|
|
||||||
// Note: 'b' attributes will overwrite 'a' with last-value-wins in attribute.Key()
|
// Note: 'b' attributes will overwrite 'a' with last-value-wins in attribute.Key()
|
||||||
// Meaning this is equivalent to: append(a.Attributes(), b.Attributes()...)
|
// Meaning this is equivalent to: append(a.Attributes(), b.Attributes()...)
|
||||||
mi := attribute.NewMergeIterator(b.Set(), a.Set())
|
mi := attribute.NewMergeIterator(b.Set(), a.Set())
|
||||||
@ -187,8 +199,23 @@ func Merge(a, b *Resource) (*Resource, error) {
|
|||||||
for mi.Next() {
|
for mi.Next() {
|
||||||
combine = append(combine, mi.Attribute())
|
combine = append(combine, mi.Attribute())
|
||||||
}
|
}
|
||||||
merged := NewWithAttributes(schemaURL, combine...)
|
|
||||||
return merged, nil
|
switch {
|
||||||
|
case a.schemaURL == "":
|
||||||
|
return NewWithAttributes(b.schemaURL, combine...), nil
|
||||||
|
case b.schemaURL == "":
|
||||||
|
return NewWithAttributes(a.schemaURL, combine...), nil
|
||||||
|
case a.schemaURL == b.schemaURL:
|
||||||
|
return NewWithAttributes(a.schemaURL, combine...), nil
|
||||||
|
}
|
||||||
|
// Return the merged resource with an appropriate error. It is up to
|
||||||
|
// the user to decide if the returned resource can be used or not.
|
||||||
|
return NewSchemaless(combine...), fmt.Errorf(
|
||||||
|
"%w: %s and %s",
|
||||||
|
ErrSchemaURLConflict,
|
||||||
|
a.schemaURL,
|
||||||
|
b.schemaURL,
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Empty returns an instance of Resource with no attributes. It is
|
// Empty returns an instance of Resource with no attributes. It is
|
||||||
|
2
vendor/go.opentelemetry.io/otel/sdk/trace/batch_span_processor.go
generated
vendored
2
vendor/go.opentelemetry.io/otel/sdk/trace/batch_span_processor.go
generated
vendored
@ -406,7 +406,7 @@ func (bsp *batchSpanProcessor) enqueueDrop(ctx context.Context, sd ReadOnlySpan)
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
// MarshalLog is the marshaling function used by the logging system to represent this exporter.
|
// MarshalLog is the marshaling function used by the logging system to represent this Span Processor.
|
||||||
func (bsp *batchSpanProcessor) MarshalLog() interface{} {
|
func (bsp *batchSpanProcessor) MarshalLog() interface{} {
|
||||||
return struct {
|
return struct {
|
||||||
Type string
|
Type string
|
||||||
|
2
vendor/go.opentelemetry.io/otel/sdk/trace/provider.go
generated
vendored
2
vendor/go.opentelemetry.io/otel/sdk/trace/provider.go
generated
vendored
@ -55,7 +55,7 @@ type tracerProviderConfig struct {
|
|||||||
resource *resource.Resource
|
resource *resource.Resource
|
||||||
}
|
}
|
||||||
|
|
||||||
// MarshalLog is the marshaling function used by the logging system to represent this exporter.
|
// MarshalLog is the marshaling function used by the logging system to represent this Provider.
|
||||||
func (cfg tracerProviderConfig) MarshalLog() interface{} {
|
func (cfg tracerProviderConfig) MarshalLog() interface{} {
|
||||||
return struct {
|
return struct {
|
||||||
SpanProcessors []SpanProcessor
|
SpanProcessors []SpanProcessor
|
||||||
|
19
vendor/go.opentelemetry.io/otel/sdk/trace/span.go
generated
vendored
19
vendor/go.opentelemetry.io/otel/sdk/trace/span.go
generated
vendored
@ -30,7 +30,7 @@ import (
|
|||||||
"go.opentelemetry.io/otel/sdk/instrumentation"
|
"go.opentelemetry.io/otel/sdk/instrumentation"
|
||||||
"go.opentelemetry.io/otel/sdk/internal"
|
"go.opentelemetry.io/otel/sdk/internal"
|
||||||
"go.opentelemetry.io/otel/sdk/resource"
|
"go.opentelemetry.io/otel/sdk/resource"
|
||||||
semconv "go.opentelemetry.io/otel/semconv/v1.21.0"
|
semconv "go.opentelemetry.io/otel/semconv/v1.24.0"
|
||||||
"go.opentelemetry.io/otel/trace"
|
"go.opentelemetry.io/otel/trace"
|
||||||
"go.opentelemetry.io/otel/trace/embedded"
|
"go.opentelemetry.io/otel/trace/embedded"
|
||||||
)
|
)
|
||||||
@ -208,6 +208,16 @@ func (s *recordingSpan) SetStatus(code codes.Code, description string) {
|
|||||||
s.status = status
|
s.status = status
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ensureAttributesCapacity inlines functionality from slices.Grow
|
||||||
|
// so that we can avoid needing to import golang.org/x/exp for go1.20.
|
||||||
|
// Once support for go1.20 is dropped, we can use slices.Grow available since go1.21 instead.
|
||||||
|
// Tracking issue: https://github.com/open-telemetry/opentelemetry-go/issues/4819.
|
||||||
|
func (s *recordingSpan) ensureAttributesCapacity(minCapacity int) {
|
||||||
|
if n := minCapacity - cap(s.attributes); n > 0 {
|
||||||
|
s.attributes = append(s.attributes[:cap(s.attributes)], make([]attribute.KeyValue, n)...)[:len(s.attributes)]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// SetAttributes sets attributes of this span.
|
// SetAttributes sets attributes of this span.
|
||||||
//
|
//
|
||||||
// If a key from attributes already exists the value associated with that key
|
// If a key from attributes already exists the value associated with that key
|
||||||
@ -242,6 +252,7 @@ func (s *recordingSpan) SetAttributes(attributes ...attribute.KeyValue) {
|
|||||||
|
|
||||||
// Otherwise, add without deduplication. When attributes are read they
|
// Otherwise, add without deduplication. When attributes are read they
|
||||||
// will be deduplicated, optimizing the operation.
|
// will be deduplicated, optimizing the operation.
|
||||||
|
s.ensureAttributesCapacity(len(s.attributes) + len(attributes))
|
||||||
for _, a := range attributes {
|
for _, a := range attributes {
|
||||||
if !a.Valid() {
|
if !a.Valid() {
|
||||||
// Drop all invalid attributes.
|
// Drop all invalid attributes.
|
||||||
@ -277,6 +288,12 @@ func (s *recordingSpan) addOverCapAttrs(limit int, attrs []attribute.KeyValue) {
|
|||||||
|
|
||||||
// Now that s.attributes is deduplicated, adding unique attributes up to
|
// Now that s.attributes is deduplicated, adding unique attributes up to
|
||||||
// the capacity of s will not over allocate s.attributes.
|
// the capacity of s will not over allocate s.attributes.
|
||||||
|
if sum := len(attrs) + len(s.attributes); sum < limit {
|
||||||
|
// After support for go1.20 is dropped, simplify if-else to min(sum, limit).
|
||||||
|
s.ensureAttributesCapacity(sum)
|
||||||
|
} else {
|
||||||
|
s.ensureAttributesCapacity(limit)
|
||||||
|
}
|
||||||
for _, a := range attrs {
|
for _, a := range attrs {
|
||||||
if !a.Valid() {
|
if !a.Valid() {
|
||||||
// Drop all invalid attributes.
|
// Drop all invalid attributes.
|
||||||
|
2
vendor/go.opentelemetry.io/otel/sdk/version.go
generated
vendored
2
vendor/go.opentelemetry.io/otel/sdk/version.go
generated
vendored
@ -16,5 +16,5 @@ package sdk // import "go.opentelemetry.io/otel/sdk"
|
|||||||
|
|
||||||
// Version is the current release version of the OpenTelemetry SDK in use.
|
// Version is the current release version of the OpenTelemetry SDK in use.
|
||||||
func Version() string {
|
func Version() string {
|
||||||
return "1.21.0"
|
return "1.23.1"
|
||||||
}
|
}
|
||||||
|
1209
vendor/go.opentelemetry.io/otel/semconv/v1.20.0/attribute_group.go
generated
vendored
Normal file
1209
vendor/go.opentelemetry.io/otel/semconv/v1.20.0/attribute_group.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
20
vendor/go.opentelemetry.io/otel/semconv/v1.20.0/doc.go
generated
vendored
Normal file
20
vendor/go.opentelemetry.io/otel/semconv/v1.20.0/doc.go
generated
vendored
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
// Copyright The OpenTelemetry Authors
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
// Package semconv implements OpenTelemetry semantic conventions.
|
||||||
|
//
|
||||||
|
// OpenTelemetry semantic conventions are agreed standardized naming
|
||||||
|
// patterns for OpenTelemetry things. This package represents the conventions
|
||||||
|
// as of the v1.20.0 version of the OpenTelemetry specification.
|
||||||
|
package semconv // import "go.opentelemetry.io/otel/semconv/v1.20.0"
|
199
vendor/go.opentelemetry.io/otel/semconv/v1.20.0/event.go
generated
vendored
Normal file
199
vendor/go.opentelemetry.io/otel/semconv/v1.20.0/event.go
generated
vendored
Normal file
@ -0,0 +1,199 @@
|
|||||||
|
// Copyright The OpenTelemetry Authors
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
// Code generated from semantic convention specification. DO NOT EDIT.
|
||||||
|
|
||||||
|
package semconv // import "go.opentelemetry.io/otel/semconv/v1.20.0"
|
||||||
|
|
||||||
|
import "go.opentelemetry.io/otel/attribute"
|
||||||
|
|
||||||
|
// This semantic convention defines the attributes used to represent a feature
|
||||||
|
// flag evaluation as an event.
|
||||||
|
const (
|
||||||
|
// FeatureFlagKeyKey is the attribute Key conforming to the
|
||||||
|
// "feature_flag.key" semantic conventions. It represents the unique
|
||||||
|
// identifier of the feature flag.
|
||||||
|
//
|
||||||
|
// Type: string
|
||||||
|
// RequirementLevel: Required
|
||||||
|
// Stability: stable
|
||||||
|
// Examples: 'logo-color'
|
||||||
|
FeatureFlagKeyKey = attribute.Key("feature_flag.key")
|
||||||
|
|
||||||
|
// FeatureFlagProviderNameKey is the attribute Key conforming to the
|
||||||
|
// "feature_flag.provider_name" semantic conventions. It represents the
|
||||||
|
// name of the service provider that performs the flag evaluation.
|
||||||
|
//
|
||||||
|
// Type: string
|
||||||
|
// RequirementLevel: Recommended
|
||||||
|
// Stability: stable
|
||||||
|
// Examples: 'Flag Manager'
|
||||||
|
FeatureFlagProviderNameKey = attribute.Key("feature_flag.provider_name")
|
||||||
|
|
||||||
|
// FeatureFlagVariantKey is the attribute Key conforming to the
|
||||||
|
// "feature_flag.variant" semantic conventions. It represents the sHOULD be
|
||||||
|
// a semantic identifier for a value. If one is unavailable, a stringified
|
||||||
|
// version of the value can be used.
|
||||||
|
//
|
||||||
|
// Type: string
|
||||||
|
// RequirementLevel: Recommended
|
||||||
|
// Stability: stable
|
||||||
|
// Examples: 'red', 'true', 'on'
|
||||||
|
// Note: A semantic identifier, commonly referred to as a variant, provides
|
||||||
|
// a means
|
||||||
|
// for referring to a value without including the value itself. This can
|
||||||
|
// provide additional context for understanding the meaning behind a value.
|
||||||
|
// For example, the variant `red` maybe be used for the value `#c05543`.
|
||||||
|
//
|
||||||
|
// A stringified version of the value can be used in situations where a
|
||||||
|
// semantic identifier is unavailable. String representation of the value
|
||||||
|
// should be determined by the implementer.
|
||||||
|
FeatureFlagVariantKey = attribute.Key("feature_flag.variant")
|
||||||
|
)
|
||||||
|
|
||||||
|
// FeatureFlagKey returns an attribute KeyValue conforming to the
|
||||||
|
// "feature_flag.key" semantic conventions. It represents the unique identifier
|
||||||
|
// of the feature flag.
|
||||||
|
func FeatureFlagKey(val string) attribute.KeyValue {
|
||||||
|
return FeatureFlagKeyKey.String(val)
|
||||||
|
}
|
||||||
|
|
||||||
|
// FeatureFlagProviderName returns an attribute KeyValue conforming to the
|
||||||
|
// "feature_flag.provider_name" semantic conventions. It represents the name of
|
||||||
|
// the service provider that performs the flag evaluation.
|
||||||
|
func FeatureFlagProviderName(val string) attribute.KeyValue {
|
||||||
|
return FeatureFlagProviderNameKey.String(val)
|
||||||
|
}
|
||||||
|
|
||||||
|
// FeatureFlagVariant returns an attribute KeyValue conforming to the
|
||||||
|
// "feature_flag.variant" semantic conventions. It represents the sHOULD be a
|
||||||
|
// semantic identifier for a value. If one is unavailable, a stringified
|
||||||
|
// version of the value can be used.
|
||||||
|
func FeatureFlagVariant(val string) attribute.KeyValue {
|
||||||
|
return FeatureFlagVariantKey.String(val)
|
||||||
|
}
|
||||||
|
|
||||||
|
// RPC received/sent message.
|
||||||
|
const (
|
||||||
|
// MessageTypeKey is the attribute Key conforming to the "message.type"
|
||||||
|
// semantic conventions. It represents the whether this is a received or
|
||||||
|
// sent message.
|
||||||
|
//
|
||||||
|
// Type: Enum
|
||||||
|
// RequirementLevel: Optional
|
||||||
|
// Stability: stable
|
||||||
|
MessageTypeKey = attribute.Key("message.type")
|
||||||
|
|
||||||
|
// MessageIDKey is the attribute Key conforming to the "message.id"
|
||||||
|
// semantic conventions. It represents the mUST be calculated as two
|
||||||
|
// different counters starting from `1` one for sent messages and one for
|
||||||
|
// received message.
|
||||||
|
//
|
||||||
|
// Type: int
|
||||||
|
// RequirementLevel: Optional
|
||||||
|
// Stability: stable
|
||||||
|
// Note: This way we guarantee that the values will be consistent between
|
||||||
|
// different implementations.
|
||||||
|
MessageIDKey = attribute.Key("message.id")
|
||||||
|
|
||||||
|
// MessageCompressedSizeKey is the attribute Key conforming to the
|
||||||
|
// "message.compressed_size" semantic conventions. It represents the
|
||||||
|
// compressed size of the message in bytes.
|
||||||
|
//
|
||||||
|
// Type: int
|
||||||
|
// RequirementLevel: Optional
|
||||||
|
// Stability: stable
|
||||||
|
MessageCompressedSizeKey = attribute.Key("message.compressed_size")
|
||||||
|
|
||||||
|
// MessageUncompressedSizeKey is the attribute Key conforming to the
|
||||||
|
// "message.uncompressed_size" semantic conventions. It represents the
|
||||||
|
// uncompressed size of the message in bytes.
|
||||||
|
//
|
||||||
|
// Type: int
|
||||||
|
// RequirementLevel: Optional
|
||||||
|
// Stability: stable
|
||||||
|
MessageUncompressedSizeKey = attribute.Key("message.uncompressed_size")
|
||||||
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
// sent
|
||||||
|
MessageTypeSent = MessageTypeKey.String("SENT")
|
||||||
|
// received
|
||||||
|
MessageTypeReceived = MessageTypeKey.String("RECEIVED")
|
||||||
|
)
|
||||||
|
|
||||||
|
// MessageID returns an attribute KeyValue conforming to the "message.id"
|
||||||
|
// semantic conventions. It represents the mUST be calculated as two different
|
||||||
|
// counters starting from `1` one for sent messages and one for received
|
||||||
|
// message.
|
||||||
|
func MessageID(val int) attribute.KeyValue {
|
||||||
|
return MessageIDKey.Int(val)
|
||||||
|
}
|
||||||
|
|
||||||
|
// MessageCompressedSize returns an attribute KeyValue conforming to the
|
||||||
|
// "message.compressed_size" semantic conventions. It represents the compressed
|
||||||
|
// size of the message in bytes.
|
||||||
|
func MessageCompressedSize(val int) attribute.KeyValue {
|
||||||
|
return MessageCompressedSizeKey.Int(val)
|
||||||
|
}
|
||||||
|
|
||||||
|
// MessageUncompressedSize returns an attribute KeyValue conforming to the
|
||||||
|
// "message.uncompressed_size" semantic conventions. It represents the
|
||||||
|
// uncompressed size of the message in bytes.
|
||||||
|
func MessageUncompressedSize(val int) attribute.KeyValue {
|
||||||
|
return MessageUncompressedSizeKey.Int(val)
|
||||||
|
}
|
||||||
|
|
||||||
|
// The attributes used to report a single exception associated with a span.
|
||||||
|
const (
|
||||||
|
// ExceptionEscapedKey is the attribute Key conforming to the
|
||||||
|
// "exception.escaped" semantic conventions. It represents the sHOULD be
|
||||||
|
// set to true if the exception event is recorded at a point where it is
|
||||||
|
// known that the exception is escaping the scope of the span.
|
||||||
|
//
|
||||||
|
// Type: boolean
|
||||||
|
// RequirementLevel: Optional
|
||||||
|
// Stability: stable
|
||||||
|
// Note: An exception is considered to have escaped (or left) the scope of
|
||||||
|
// a span,
|
||||||
|
// if that span is ended while the exception is still logically "in
|
||||||
|
// flight".
|
||||||
|
// This may be actually "in flight" in some languages (e.g. if the
|
||||||
|
// exception
|
||||||
|
// is passed to a Context manager's `__exit__` method in Python) but will
|
||||||
|
// usually be caught at the point of recording the exception in most
|
||||||
|
// languages.
|
||||||
|
//
|
||||||
|
// It is usually not possible to determine at the point where an exception
|
||||||
|
// is thrown
|
||||||
|
// whether it will escape the scope of a span.
|
||||||
|
// However, it is trivial to know that an exception
|
||||||
|
// will escape, if one checks for an active exception just before ending
|
||||||
|
// the span,
|
||||||
|
// as done in the [example above](#recording-an-exception).
|
||||||
|
//
|
||||||
|
// It follows that an exception may still escape the scope of the span
|
||||||
|
// even if the `exception.escaped` attribute was not set or set to false,
|
||||||
|
// since the event might have been recorded at a time where it was not
|
||||||
|
// clear whether the exception will escape.
|
||||||
|
ExceptionEscapedKey = attribute.Key("exception.escaped")
|
||||||
|
)
|
||||||
|
|
||||||
|
// ExceptionEscaped returns an attribute KeyValue conforming to the
|
||||||
|
// "exception.escaped" semantic conventions. It represents the sHOULD be set to
|
||||||
|
// true if the exception event is recorded at a point where it is known that
|
||||||
|
// the exception is escaping the scope of the span.
|
||||||
|
func ExceptionEscaped(val bool) attribute.KeyValue {
|
||||||
|
return ExceptionEscapedKey.Bool(val)
|
||||||
|
}
|
20
vendor/go.opentelemetry.io/otel/semconv/v1.20.0/exception.go
generated
vendored
Normal file
20
vendor/go.opentelemetry.io/otel/semconv/v1.20.0/exception.go
generated
vendored
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
// Copyright The OpenTelemetry Authors
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
package semconv // import "go.opentelemetry.io/otel/semconv/v1.20.0"
|
||||||
|
|
||||||
|
const (
|
||||||
|
// ExceptionEventName is the name of the Span event representing an exception.
|
||||||
|
ExceptionEventName = "exception"
|
||||||
|
)
|
21
vendor/go.opentelemetry.io/otel/semconv/v1.20.0/http.go
generated
vendored
Normal file
21
vendor/go.opentelemetry.io/otel/semconv/v1.20.0/http.go
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
// Copyright The OpenTelemetry Authors
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
package semconv // import "go.opentelemetry.io/otel/semconv/v1.20.0"
|
||||||
|
|
||||||
|
// HTTP scheme attributes.
|
||||||
|
var (
|
||||||
|
HTTPSchemeHTTP = HTTPSchemeKey.String("http")
|
||||||
|
HTTPSchemeHTTPS = HTTPSchemeKey.String("https")
|
||||||
|
)
|
2071
vendor/go.opentelemetry.io/otel/semconv/v1.20.0/resource.go
generated
vendored
Normal file
2071
vendor/go.opentelemetry.io/otel/semconv/v1.20.0/resource.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
20
vendor/go.opentelemetry.io/otel/semconv/v1.20.0/schema.go
generated
vendored
Normal file
20
vendor/go.opentelemetry.io/otel/semconv/v1.20.0/schema.go
generated
vendored
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
// Copyright The OpenTelemetry Authors
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
package semconv // import "go.opentelemetry.io/otel/semconv/v1.20.0"
|
||||||
|
|
||||||
|
// SchemaURL is the schema URL that matches the version of the semantic conventions
|
||||||
|
// that this package defines. Semconv packages starting from v1.4.0 must declare
|
||||||
|
// non-empty schema URL in the form https://opentelemetry.io/schemas/<version>
|
||||||
|
const SchemaURL = "https://opentelemetry.io/schemas/1.20.0"
|
2610
vendor/go.opentelemetry.io/otel/semconv/v1.20.0/trace.go
generated
vendored
Normal file
2610
vendor/go.opentelemetry.io/otel/semconv/v1.20.0/trace.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
4
vendor/go.opentelemetry.io/otel/semconv/v1.21.0/doc.go
generated
vendored
4
vendor/go.opentelemetry.io/otel/semconv/v1.21.0/doc.go
generated
vendored
@ -15,6 +15,6 @@
|
|||||||
// Package semconv implements OpenTelemetry semantic conventions.
|
// Package semconv implements OpenTelemetry semantic conventions.
|
||||||
//
|
//
|
||||||
// OpenTelemetry semantic conventions are agreed standardized naming
|
// OpenTelemetry semantic conventions are agreed standardized naming
|
||||||
// patterns for OpenTelemetry things. This package represents the conventions
|
// patterns for OpenTelemetry things. This package represents the v1.21.0
|
||||||
// as of the v1.21.0 version of the OpenTelemetry specification.
|
// version of the OpenTelemetry semantic conventions.
|
||||||
package semconv // import "go.opentelemetry.io/otel/semconv/v1.21.0"
|
package semconv // import "go.opentelemetry.io/otel/semconv/v1.21.0"
|
||||||
|
4398
vendor/go.opentelemetry.io/otel/semconv/v1.24.0/attribute_group.go
generated
vendored
Normal file
4398
vendor/go.opentelemetry.io/otel/semconv/v1.24.0/attribute_group.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
20
vendor/go.opentelemetry.io/otel/semconv/v1.24.0/doc.go
generated
vendored
Normal file
20
vendor/go.opentelemetry.io/otel/semconv/v1.24.0/doc.go
generated
vendored
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
// Copyright The OpenTelemetry Authors
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
// Package semconv implements OpenTelemetry semantic conventions.
|
||||||
|
//
|
||||||
|
// OpenTelemetry semantic conventions are agreed standardized naming
|
||||||
|
// patterns for OpenTelemetry things. This package represents the v1.24.0
|
||||||
|
// version of the OpenTelemetry semantic conventions.
|
||||||
|
package semconv // import "go.opentelemetry.io/otel/semconv/v1.24.0"
|
211
vendor/go.opentelemetry.io/otel/semconv/v1.24.0/event.go
generated
vendored
Normal file
211
vendor/go.opentelemetry.io/otel/semconv/v1.24.0/event.go
generated
vendored
Normal file
@ -0,0 +1,211 @@
|
|||||||
|
// Copyright The OpenTelemetry Authors
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
// Code generated from semantic convention specification. DO NOT EDIT.
|
||||||
|
|
||||||
|
package semconv // import "go.opentelemetry.io/otel/semconv/v1.24.0"
|
||||||
|
|
||||||
|
import "go.opentelemetry.io/otel/attribute"
|
||||||
|
|
||||||
|
// This event represents an occurrence of a lifecycle transition on the iOS
|
||||||
|
// platform.
|
||||||
|
const (
|
||||||
|
// IosStateKey is the attribute Key conforming to the "ios.state" semantic
|
||||||
|
// conventions. It represents the this attribute represents the state the
|
||||||
|
// application has transitioned into at the occurrence of the event.
|
||||||
|
//
|
||||||
|
// Type: Enum
|
||||||
|
// RequirementLevel: Required
|
||||||
|
// Stability: experimental
|
||||||
|
// Note: The iOS lifecycle states are defined in the [UIApplicationDelegate
|
||||||
|
// documentation](https://developer.apple.com/documentation/uikit/uiapplicationdelegate#1656902),
|
||||||
|
// and from which the `OS terminology` column values are derived.
|
||||||
|
IosStateKey = attribute.Key("ios.state")
|
||||||
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
// The app has become `active`. Associated with UIKit notification `applicationDidBecomeActive`
|
||||||
|
IosStateActive = IosStateKey.String("active")
|
||||||
|
// The app is now `inactive`. Associated with UIKit notification `applicationWillResignActive`
|
||||||
|
IosStateInactive = IosStateKey.String("inactive")
|
||||||
|
// The app is now in the background. This value is associated with UIKit notification `applicationDidEnterBackground`
|
||||||
|
IosStateBackground = IosStateKey.String("background")
|
||||||
|
// The app is now in the foreground. This value is associated with UIKit notification `applicationWillEnterForeground`
|
||||||
|
IosStateForeground = IosStateKey.String("foreground")
|
||||||
|
// The app is about to terminate. Associated with UIKit notification `applicationWillTerminate`
|
||||||
|
IosStateTerminate = IosStateKey.String("terminate")
|
||||||
|
)
|
||||||
|
|
||||||
|
// This event represents an occurrence of a lifecycle transition on the Android
|
||||||
|
// platform.
|
||||||
|
const (
|
||||||
|
// AndroidStateKey is the attribute Key conforming to the "android.state"
|
||||||
|
// semantic conventions. It represents the this attribute represents the
|
||||||
|
// state the application has transitioned into at the occurrence of the
|
||||||
|
// event.
|
||||||
|
//
|
||||||
|
// Type: Enum
|
||||||
|
// RequirementLevel: Required
|
||||||
|
// Stability: experimental
|
||||||
|
// Note: The Android lifecycle states are defined in [Activity lifecycle
|
||||||
|
// callbacks](https://developer.android.com/guide/components/activities/activity-lifecycle#lc),
|
||||||
|
// and from which the `OS identifiers` are derived.
|
||||||
|
AndroidStateKey = attribute.Key("android.state")
|
||||||
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
// Any time before Activity.onResume() or, if the app has no Activity, Context.startService() has been called in the app for the first time
|
||||||
|
AndroidStateCreated = AndroidStateKey.String("created")
|
||||||
|
// Any time after Activity.onPause() or, if the app has no Activity, Context.stopService() has been called when the app was in the foreground state
|
||||||
|
AndroidStateBackground = AndroidStateKey.String("background")
|
||||||
|
// Any time after Activity.onResume() or, if the app has no Activity, Context.startService() has been called when the app was in either the created or background states
|
||||||
|
AndroidStateForeground = AndroidStateKey.String("foreground")
|
||||||
|
)
|
||||||
|
|
||||||
|
// This semantic convention defines the attributes used to represent a feature
|
||||||
|
// flag evaluation as an event.
|
||||||
|
const (
|
||||||
|
// FeatureFlagKeyKey is the attribute Key conforming to the
|
||||||
|
// "feature_flag.key" semantic conventions. It represents the unique
|
||||||
|
// identifier of the feature flag.
|
||||||
|
//
|
||||||
|
// Type: string
|
||||||
|
// RequirementLevel: Required
|
||||||
|
// Stability: experimental
|
||||||
|
// Examples: 'logo-color'
|
||||||
|
FeatureFlagKeyKey = attribute.Key("feature_flag.key")
|
||||||
|
|
||||||
|
// FeatureFlagProviderNameKey is the attribute Key conforming to the
|
||||||
|
// "feature_flag.provider_name" semantic conventions. It represents the
|
||||||
|
// name of the service provider that performs the flag evaluation.
|
||||||
|
//
|
||||||
|
// Type: string
|
||||||
|
// RequirementLevel: Recommended
|
||||||
|
// Stability: experimental
|
||||||
|
// Examples: 'Flag Manager'
|
||||||
|
FeatureFlagProviderNameKey = attribute.Key("feature_flag.provider_name")
|
||||||
|
|
||||||
|
// FeatureFlagVariantKey is the attribute Key conforming to the
|
||||||
|
// "feature_flag.variant" semantic conventions. It represents the sHOULD be
|
||||||
|
// a semantic identifier for a value. If one is unavailable, a stringified
|
||||||
|
// version of the value can be used.
|
||||||
|
//
|
||||||
|
// Type: string
|
||||||
|
// RequirementLevel: Recommended
|
||||||
|
// Stability: experimental
|
||||||
|
// Examples: 'red', 'true', 'on'
|
||||||
|
// Note: A semantic identifier, commonly referred to as a variant, provides
|
||||||
|
// a means
|
||||||
|
// for referring to a value without including the value itself. This can
|
||||||
|
// provide additional context for understanding the meaning behind a value.
|
||||||
|
// For example, the variant `red` maybe be used for the value `#c05543`.
|
||||||
|
//
|
||||||
|
// A stringified version of the value can be used in situations where a
|
||||||
|
// semantic identifier is unavailable. String representation of the value
|
||||||
|
// should be determined by the implementer.
|
||||||
|
FeatureFlagVariantKey = attribute.Key("feature_flag.variant")
|
||||||
|
)
|
||||||
|
|
||||||
|
// FeatureFlagKey returns an attribute KeyValue conforming to the
|
||||||
|
// "feature_flag.key" semantic conventions. It represents the unique identifier
|
||||||
|
// of the feature flag.
|
||||||
|
func FeatureFlagKey(val string) attribute.KeyValue {
|
||||||
|
return FeatureFlagKeyKey.String(val)
|
||||||
|
}
|
||||||
|
|
||||||
|
// FeatureFlagProviderName returns an attribute KeyValue conforming to the
|
||||||
|
// "feature_flag.provider_name" semantic conventions. It represents the name of
|
||||||
|
// the service provider that performs the flag evaluation.
|
||||||
|
func FeatureFlagProviderName(val string) attribute.KeyValue {
|
||||||
|
return FeatureFlagProviderNameKey.String(val)
|
||||||
|
}
|
||||||
|
|
||||||
|
// FeatureFlagVariant returns an attribute KeyValue conforming to the
|
||||||
|
// "feature_flag.variant" semantic conventions. It represents the sHOULD be a
|
||||||
|
// semantic identifier for a value. If one is unavailable, a stringified
|
||||||
|
// version of the value can be used.
|
||||||
|
func FeatureFlagVariant(val string) attribute.KeyValue {
|
||||||
|
return FeatureFlagVariantKey.String(val)
|
||||||
|
}
|
||||||
|
|
||||||
|
// RPC received/sent message.
|
||||||
|
const (
|
||||||
|
// MessageCompressedSizeKey is the attribute Key conforming to the
|
||||||
|
// "message.compressed_size" semantic conventions. It represents the
|
||||||
|
// compressed size of the message in bytes.
|
||||||
|
//
|
||||||
|
// Type: int
|
||||||
|
// RequirementLevel: Optional
|
||||||
|
// Stability: experimental
|
||||||
|
MessageCompressedSizeKey = attribute.Key("message.compressed_size")
|
||||||
|
|
||||||
|
// MessageIDKey is the attribute Key conforming to the "message.id"
|
||||||
|
// semantic conventions. It represents the mUST be calculated as two
|
||||||
|
// different counters starting from `1` one for sent messages and one for
|
||||||
|
// received message.
|
||||||
|
//
|
||||||
|
// Type: int
|
||||||
|
// RequirementLevel: Optional
|
||||||
|
// Stability: experimental
|
||||||
|
// Note: This way we guarantee that the values will be consistent between
|
||||||
|
// different implementations.
|
||||||
|
MessageIDKey = attribute.Key("message.id")
|
||||||
|
|
||||||
|
// MessageTypeKey is the attribute Key conforming to the "message.type"
|
||||||
|
// semantic conventions. It represents the whether this is a received or
|
||||||
|
// sent message.
|
||||||
|
//
|
||||||
|
// Type: Enum
|
||||||
|
// RequirementLevel: Optional
|
||||||
|
// Stability: experimental
|
||||||
|
MessageTypeKey = attribute.Key("message.type")
|
||||||
|
|
||||||
|
// MessageUncompressedSizeKey is the attribute Key conforming to the
|
||||||
|
// "message.uncompressed_size" semantic conventions. It represents the
|
||||||
|
// uncompressed size of the message in bytes.
|
||||||
|
//
|
||||||
|
// Type: int
|
||||||
|
// RequirementLevel: Optional
|
||||||
|
// Stability: experimental
|
||||||
|
MessageUncompressedSizeKey = attribute.Key("message.uncompressed_size")
|
||||||
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
// sent
|
||||||
|
MessageTypeSent = MessageTypeKey.String("SENT")
|
||||||
|
// received
|
||||||
|
MessageTypeReceived = MessageTypeKey.String("RECEIVED")
|
||||||
|
)
|
||||||
|
|
||||||
|
// MessageCompressedSize returns an attribute KeyValue conforming to the
|
||||||
|
// "message.compressed_size" semantic conventions. It represents the compressed
|
||||||
|
// size of the message in bytes.
|
||||||
|
func MessageCompressedSize(val int) attribute.KeyValue {
|
||||||
|
return MessageCompressedSizeKey.Int(val)
|
||||||
|
}
|
||||||
|
|
||||||
|
// MessageID returns an attribute KeyValue conforming to the "message.id"
|
||||||
|
// semantic conventions. It represents the mUST be calculated as two different
|
||||||
|
// counters starting from `1` one for sent messages and one for received
|
||||||
|
// message.
|
||||||
|
func MessageID(val int) attribute.KeyValue {
|
||||||
|
return MessageIDKey.Int(val)
|
||||||
|
}
|
||||||
|
|
||||||
|
// MessageUncompressedSize returns an attribute KeyValue conforming to the
|
||||||
|
// "message.uncompressed_size" semantic conventions. It represents the
|
||||||
|
// uncompressed size of the message in bytes.
|
||||||
|
func MessageUncompressedSize(val int) attribute.KeyValue {
|
||||||
|
return MessageUncompressedSizeKey.Int(val)
|
||||||
|
}
|
20
vendor/go.opentelemetry.io/otel/semconv/v1.24.0/exception.go
generated
vendored
Normal file
20
vendor/go.opentelemetry.io/otel/semconv/v1.24.0/exception.go
generated
vendored
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
// Copyright The OpenTelemetry Authors
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
package semconv // import "go.opentelemetry.io/otel/semconv/v1.24.0"
|
||||||
|
|
||||||
|
const (
|
||||||
|
// ExceptionEventName is the name of the Span event representing an exception.
|
||||||
|
ExceptionEventName = "exception"
|
||||||
|
)
|
2556
vendor/go.opentelemetry.io/otel/semconv/v1.24.0/resource.go
generated
vendored
Normal file
2556
vendor/go.opentelemetry.io/otel/semconv/v1.24.0/resource.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
20
vendor/go.opentelemetry.io/otel/semconv/v1.24.0/schema.go
generated
vendored
Normal file
20
vendor/go.opentelemetry.io/otel/semconv/v1.24.0/schema.go
generated
vendored
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
// Copyright The OpenTelemetry Authors
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
package semconv // import "go.opentelemetry.io/otel/semconv/v1.24.0"
|
||||||
|
|
||||||
|
// SchemaURL is the schema URL that matches the version of the semantic conventions
|
||||||
|
// that this package defines. Semconv packages starting from v1.4.0 must declare
|
||||||
|
// non-empty schema URL in the form https://opentelemetry.io/schemas/<version>
|
||||||
|
const SchemaURL = "https://opentelemetry.io/schemas/1.24.0"
|
1334
vendor/go.opentelemetry.io/otel/semconv/v1.24.0/trace.go
generated
vendored
Normal file
1334
vendor/go.opentelemetry.io/otel/semconv/v1.24.0/trace.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
201
vendor/go.opentelemetry.io/otel/trace/tracestate.go
generated
vendored
201
vendor/go.opentelemetry.io/otel/trace/tracestate.go
generated
vendored
@ -17,20 +17,14 @@ package trace // import "go.opentelemetry.io/otel/trace"
|
|||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"regexp"
|
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
maxListMembers = 32
|
maxListMembers = 32
|
||||||
|
|
||||||
listDelimiter = ","
|
listDelimiters = ","
|
||||||
|
memberDelimiter = "="
|
||||||
// based on the W3C Trace Context specification, see
|
|
||||||
// https://www.w3.org/TR/trace-context-1/#tracestate-header
|
|
||||||
noTenantKeyFormat = `[a-z][_0-9a-z\-\*\/]*`
|
|
||||||
withTenantKeyFormat = `[a-z0-9][_0-9a-z\-\*\/]*@[a-z][_0-9a-z\-\*\/]*`
|
|
||||||
valueFormat = `[\x20-\x2b\x2d-\x3c\x3e-\x7e]*[\x21-\x2b\x2d-\x3c\x3e-\x7e]`
|
|
||||||
|
|
||||||
errInvalidKey errorConst = "invalid tracestate key"
|
errInvalidKey errorConst = "invalid tracestate key"
|
||||||
errInvalidValue errorConst = "invalid tracestate value"
|
errInvalidValue errorConst = "invalid tracestate value"
|
||||||
@ -39,43 +33,128 @@ const (
|
|||||||
errDuplicate errorConst = "duplicate list-member in tracestate"
|
errDuplicate errorConst = "duplicate list-member in tracestate"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
|
||||||
noTenantKeyRe = regexp.MustCompile(`^` + noTenantKeyFormat + `$`)
|
|
||||||
withTenantKeyRe = regexp.MustCompile(`^` + withTenantKeyFormat + `$`)
|
|
||||||
valueRe = regexp.MustCompile(`^` + valueFormat + `$`)
|
|
||||||
memberRe = regexp.MustCompile(`^\s*((?:` + noTenantKeyFormat + `)|(?:` + withTenantKeyFormat + `))=(` + valueFormat + `)\s*$`)
|
|
||||||
)
|
|
||||||
|
|
||||||
type member struct {
|
type member struct {
|
||||||
Key string
|
Key string
|
||||||
Value string
|
Value string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// according to (chr = %x20 / (nblk-char = %x21-2B / %x2D-3C / %x3E-7E) )
|
||||||
|
// means (chr = %x20-2B / %x2D-3C / %x3E-7E) .
|
||||||
|
func checkValueChar(v byte) bool {
|
||||||
|
return v >= '\x20' && v <= '\x7e' && v != '\x2c' && v != '\x3d'
|
||||||
|
}
|
||||||
|
|
||||||
|
// according to (nblk-chr = %x21-2B / %x2D-3C / %x3E-7E) .
|
||||||
|
func checkValueLast(v byte) bool {
|
||||||
|
return v >= '\x21' && v <= '\x7e' && v != '\x2c' && v != '\x3d'
|
||||||
|
}
|
||||||
|
|
||||||
|
// based on the W3C Trace Context specification
|
||||||
|
//
|
||||||
|
// value = (0*255(chr)) nblk-chr
|
||||||
|
// nblk-chr = %x21-2B / %x2D-3C / %x3E-7E
|
||||||
|
// chr = %x20 / nblk-chr
|
||||||
|
//
|
||||||
|
// see https://www.w3.org/TR/trace-context-1/#value
|
||||||
|
func checkValue(val string) bool {
|
||||||
|
n := len(val)
|
||||||
|
if n == 0 || n > 256 {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
for i := 0; i < n-1; i++ {
|
||||||
|
if !checkValueChar(val[i]) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return checkValueLast(val[n-1])
|
||||||
|
}
|
||||||
|
|
||||||
|
func checkKeyRemain(key string) bool {
|
||||||
|
// ( lcalpha / DIGIT / "_" / "-"/ "*" / "/" )
|
||||||
|
for _, v := range key {
|
||||||
|
if isAlphaNum(byte(v)) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
switch v {
|
||||||
|
case '_', '-', '*', '/':
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// according to
|
||||||
|
//
|
||||||
|
// simple-key = lcalpha (0*255( lcalpha / DIGIT / "_" / "-"/ "*" / "/" ))
|
||||||
|
// system-id = lcalpha (0*13( lcalpha / DIGIT / "_" / "-"/ "*" / "/" ))
|
||||||
|
//
|
||||||
|
// param n is remain part length, should be 255 in simple-key or 13 in system-id.
|
||||||
|
func checkKeyPart(key string, n int) bool {
|
||||||
|
if len(key) == 0 {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
first := key[0] // key's first char
|
||||||
|
ret := len(key[1:]) <= n
|
||||||
|
ret = ret && first >= 'a' && first <= 'z'
|
||||||
|
return ret && checkKeyRemain(key[1:])
|
||||||
|
}
|
||||||
|
|
||||||
|
func isAlphaNum(c byte) bool {
|
||||||
|
if c >= 'a' && c <= 'z' {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return c >= '0' && c <= '9'
|
||||||
|
}
|
||||||
|
|
||||||
|
// according to
|
||||||
|
//
|
||||||
|
// tenant-id = ( lcalpha / DIGIT ) 0*240( lcalpha / DIGIT / "_" / "-"/ "*" / "/" )
|
||||||
|
//
|
||||||
|
// param n is remain part length, should be 240 exactly.
|
||||||
|
func checkKeyTenant(key string, n int) bool {
|
||||||
|
if len(key) == 0 {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return isAlphaNum(key[0]) && len(key[1:]) <= n && checkKeyRemain(key[1:])
|
||||||
|
}
|
||||||
|
|
||||||
|
// based on the W3C Trace Context specification
|
||||||
|
//
|
||||||
|
// key = simple-key / multi-tenant-key
|
||||||
|
// simple-key = lcalpha (0*255( lcalpha / DIGIT / "_" / "-"/ "*" / "/" ))
|
||||||
|
// multi-tenant-key = tenant-id "@" system-id
|
||||||
|
// tenant-id = ( lcalpha / DIGIT ) (0*240( lcalpha / DIGIT / "_" / "-"/ "*" / "/" ))
|
||||||
|
// system-id = lcalpha (0*13( lcalpha / DIGIT / "_" / "-"/ "*" / "/" ))
|
||||||
|
// lcalpha = %x61-7A ; a-z
|
||||||
|
//
|
||||||
|
// see https://www.w3.org/TR/trace-context-1/#tracestate-header.
|
||||||
|
func checkKey(key string) bool {
|
||||||
|
tenant, system, ok := strings.Cut(key, "@")
|
||||||
|
if !ok {
|
||||||
|
return checkKeyPart(key, 255)
|
||||||
|
}
|
||||||
|
return checkKeyTenant(tenant, 240) && checkKeyPart(system, 13)
|
||||||
|
}
|
||||||
|
|
||||||
func newMember(key, value string) (member, error) {
|
func newMember(key, value string) (member, error) {
|
||||||
if len(key) > 256 {
|
if !checkKey(key) {
|
||||||
return member{}, fmt.Errorf("%w: %s", errInvalidKey, key)
|
return member{}, errInvalidKey
|
||||||
}
|
}
|
||||||
if !noTenantKeyRe.MatchString(key) {
|
if !checkValue(value) {
|
||||||
if !withTenantKeyRe.MatchString(key) {
|
return member{}, errInvalidValue
|
||||||
return member{}, fmt.Errorf("%w: %s", errInvalidKey, key)
|
|
||||||
}
|
|
||||||
atIndex := strings.LastIndex(key, "@")
|
|
||||||
if atIndex > 241 || len(key)-1-atIndex > 14 {
|
|
||||||
return member{}, fmt.Errorf("%w: %s", errInvalidKey, key)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if len(value) > 256 || !valueRe.MatchString(value) {
|
|
||||||
return member{}, fmt.Errorf("%w: %s", errInvalidValue, value)
|
|
||||||
}
|
}
|
||||||
return member{Key: key, Value: value}, nil
|
return member{Key: key, Value: value}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func parseMember(m string) (member, error) {
|
func parseMember(m string) (member, error) {
|
||||||
matches := memberRe.FindStringSubmatch(m)
|
key, val, ok := strings.Cut(m, memberDelimiter)
|
||||||
if len(matches) != 3 {
|
if !ok {
|
||||||
return member{}, fmt.Errorf("%w: %s", errInvalidMember, m)
|
return member{}, fmt.Errorf("%w: %s", errInvalidMember, m)
|
||||||
}
|
}
|
||||||
result, e := newMember(matches[1], matches[2])
|
key = strings.TrimLeft(key, " \t")
|
||||||
|
val = strings.TrimRight(val, " \t")
|
||||||
|
result, e := newMember(key, val)
|
||||||
if e != nil {
|
if e != nil {
|
||||||
return member{}, fmt.Errorf("%w: %s", errInvalidMember, m)
|
return member{}, fmt.Errorf("%w: %s", errInvalidMember, m)
|
||||||
}
|
}
|
||||||
@ -85,7 +164,7 @@ func parseMember(m string) (member, error) {
|
|||||||
// String encodes member into a string compliant with the W3C Trace Context
|
// String encodes member into a string compliant with the W3C Trace Context
|
||||||
// specification.
|
// specification.
|
||||||
func (m member) String() string {
|
func (m member) String() string {
|
||||||
return fmt.Sprintf("%s=%s", m.Key, m.Value)
|
return m.Key + "=" + m.Value
|
||||||
}
|
}
|
||||||
|
|
||||||
// TraceState provides additional vendor-specific trace identification
|
// TraceState provides additional vendor-specific trace identification
|
||||||
@ -109,8 +188,8 @@ var _ json.Marshaler = TraceState{}
|
|||||||
// ParseTraceState attempts to decode a TraceState from the passed
|
// ParseTraceState attempts to decode a TraceState from the passed
|
||||||
// string. It returns an error if the input is invalid according to the W3C
|
// string. It returns an error if the input is invalid according to the W3C
|
||||||
// Trace Context specification.
|
// Trace Context specification.
|
||||||
func ParseTraceState(tracestate string) (TraceState, error) {
|
func ParseTraceState(ts string) (TraceState, error) {
|
||||||
if tracestate == "" {
|
if ts == "" {
|
||||||
return TraceState{}, nil
|
return TraceState{}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -120,7 +199,9 @@ func ParseTraceState(tracestate string) (TraceState, error) {
|
|||||||
|
|
||||||
var members []member
|
var members []member
|
||||||
found := make(map[string]struct{})
|
found := make(map[string]struct{})
|
||||||
for _, memberStr := range strings.Split(tracestate, listDelimiter) {
|
for ts != "" {
|
||||||
|
var memberStr string
|
||||||
|
memberStr, ts, _ = strings.Cut(ts, listDelimiters)
|
||||||
if len(memberStr) == 0 {
|
if len(memberStr) == 0 {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
@ -153,11 +234,29 @@ func (ts TraceState) MarshalJSON() ([]byte, error) {
|
|||||||
// Trace Context specification. The returned string will be invalid if the
|
// Trace Context specification. The returned string will be invalid if the
|
||||||
// TraceState contains any invalid members.
|
// TraceState contains any invalid members.
|
||||||
func (ts TraceState) String() string {
|
func (ts TraceState) String() string {
|
||||||
members := make([]string, len(ts.list))
|
if len(ts.list) == 0 {
|
||||||
for i, m := range ts.list {
|
return ""
|
||||||
members[i] = m.String()
|
|
||||||
}
|
}
|
||||||
return strings.Join(members, listDelimiter)
|
var n int
|
||||||
|
n += len(ts.list) // member delimiters: '='
|
||||||
|
n += len(ts.list) - 1 // list delimiters: ','
|
||||||
|
for _, mem := range ts.list {
|
||||||
|
n += len(mem.Key)
|
||||||
|
n += len(mem.Value)
|
||||||
|
}
|
||||||
|
|
||||||
|
var sb strings.Builder
|
||||||
|
sb.Grow(n)
|
||||||
|
_, _ = sb.WriteString(ts.list[0].Key)
|
||||||
|
_ = sb.WriteByte('=')
|
||||||
|
_, _ = sb.WriteString(ts.list[0].Value)
|
||||||
|
for i := 1; i < len(ts.list); i++ {
|
||||||
|
_ = sb.WriteByte(listDelimiters[0])
|
||||||
|
_, _ = sb.WriteString(ts.list[i].Key)
|
||||||
|
_ = sb.WriteByte('=')
|
||||||
|
_, _ = sb.WriteString(ts.list[i].Value)
|
||||||
|
}
|
||||||
|
return sb.String()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get returns the value paired with key from the corresponding TraceState
|
// Get returns the value paired with key from the corresponding TraceState
|
||||||
@ -189,15 +288,25 @@ func (ts TraceState) Insert(key, value string) (TraceState, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return ts, err
|
return ts, err
|
||||||
}
|
}
|
||||||
|
n := len(ts.list)
|
||||||
cTS := ts.Delete(key)
|
found := n
|
||||||
if cTS.Len()+1 <= maxListMembers {
|
for i := range ts.list {
|
||||||
cTS.list = append(cTS.list, member{})
|
if ts.list[i].Key == key {
|
||||||
|
found = i
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cTS := TraceState{}
|
||||||
|
if found == n && n < maxListMembers {
|
||||||
|
cTS.list = make([]member, n+1)
|
||||||
|
} else {
|
||||||
|
cTS.list = make([]member, n)
|
||||||
}
|
}
|
||||||
// When the number of members exceeds capacity, drop the "right-most".
|
|
||||||
copy(cTS.list[1:], cTS.list)
|
|
||||||
cTS.list[0] = m
|
cTS.list[0] = m
|
||||||
|
// When the number of members exceeds capacity, drop the "right-most".
|
||||||
|
copy(cTS.list[1:], ts.list[0:found])
|
||||||
|
if found < n {
|
||||||
|
copy(cTS.list[1+found:], ts.list[found+1:])
|
||||||
|
}
|
||||||
return cTS, nil
|
return cTS, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
vendor/go.opentelemetry.io/otel/version.go
generated
vendored
2
vendor/go.opentelemetry.io/otel/version.go
generated
vendored
@ -16,5 +16,5 @@ package otel // import "go.opentelemetry.io/otel"
|
|||||||
|
|
||||||
// Version is the current release version of OpenTelemetry in use.
|
// Version is the current release version of OpenTelemetry in use.
|
||||||
func Version() string {
|
func Version() string {
|
||||||
return "1.21.0"
|
return "1.23.1"
|
||||||
}
|
}
|
||||||
|
16
vendor/go.opentelemetry.io/otel/versions.yaml
generated
vendored
16
vendor/go.opentelemetry.io/otel/versions.yaml
generated
vendored
@ -14,19 +14,25 @@
|
|||||||
|
|
||||||
module-sets:
|
module-sets:
|
||||||
stable-v1:
|
stable-v1:
|
||||||
version: v1.21.0
|
version: v1.23.1
|
||||||
modules:
|
modules:
|
||||||
- go.opentelemetry.io/otel
|
- go.opentelemetry.io/otel
|
||||||
|
- go.opentelemetry.io/otel/bridge/opencensus
|
||||||
|
- go.opentelemetry.io/otel/bridge/opencensus/test
|
||||||
- go.opentelemetry.io/otel/bridge/opentracing
|
- go.opentelemetry.io/otel/bridge/opentracing
|
||||||
- go.opentelemetry.io/otel/bridge/opentracing/test
|
- go.opentelemetry.io/otel/bridge/opentracing/test
|
||||||
- go.opentelemetry.io/otel/example/dice
|
- go.opentelemetry.io/otel/example/dice
|
||||||
- go.opentelemetry.io/otel/example/namedtracer
|
- go.opentelemetry.io/otel/example/namedtracer
|
||||||
|
- go.opentelemetry.io/otel/example/opencensus
|
||||||
- go.opentelemetry.io/otel/example/otel-collector
|
- go.opentelemetry.io/otel/example/otel-collector
|
||||||
- go.opentelemetry.io/otel/example/passthrough
|
- go.opentelemetry.io/otel/example/passthrough
|
||||||
- go.opentelemetry.io/otel/example/zipkin
|
- go.opentelemetry.io/otel/example/zipkin
|
||||||
|
- go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc
|
||||||
|
- go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp
|
||||||
- go.opentelemetry.io/otel/exporters/otlp/otlptrace
|
- go.opentelemetry.io/otel/exporters/otlp/otlptrace
|
||||||
- go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc
|
- go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc
|
||||||
- go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp
|
- go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp
|
||||||
|
- go.opentelemetry.io/otel/exporters/stdout/stdoutmetric
|
||||||
- go.opentelemetry.io/otel/exporters/stdout/stdouttrace
|
- go.opentelemetry.io/otel/exporters/stdout/stdouttrace
|
||||||
- go.opentelemetry.io/otel/exporters/zipkin
|
- go.opentelemetry.io/otel/exporters/zipkin
|
||||||
- go.opentelemetry.io/otel/metric
|
- go.opentelemetry.io/otel/metric
|
||||||
@ -34,16 +40,10 @@ module-sets:
|
|||||||
- go.opentelemetry.io/otel/sdk/metric
|
- go.opentelemetry.io/otel/sdk/metric
|
||||||
- go.opentelemetry.io/otel/trace
|
- go.opentelemetry.io/otel/trace
|
||||||
experimental-metrics:
|
experimental-metrics:
|
||||||
version: v0.44.0
|
version: v0.45.2
|
||||||
modules:
|
modules:
|
||||||
- go.opentelemetry.io/otel/bridge/opencensus
|
|
||||||
- go.opentelemetry.io/otel/bridge/opencensus/test
|
|
||||||
- go.opentelemetry.io/otel/example/opencensus
|
|
||||||
- go.opentelemetry.io/otel/example/prometheus
|
- go.opentelemetry.io/otel/example/prometheus
|
||||||
- go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc
|
|
||||||
- go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp
|
|
||||||
- go.opentelemetry.io/otel/exporters/prometheus
|
- go.opentelemetry.io/otel/exporters/prometheus
|
||||||
- go.opentelemetry.io/otel/exporters/stdout/stdoutmetric
|
|
||||||
experimental-schema:
|
experimental-schema:
|
||||||
version: v0.0.7
|
version: v0.0.7
|
||||||
modules:
|
modules:
|
||||||
|
367
vendor/go.opentelemetry.io/proto/otlp/trace/v1/trace.pb.go
generated
vendored
367
vendor/go.opentelemetry.io/proto/otlp/trace/v1/trace.pb.go
generated
vendored
@ -36,6 +36,69 @@ const (
|
|||||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// SpanFlags represents constants used to interpret the
|
||||||
|
// Span.flags field, which is protobuf 'fixed32' type and is to
|
||||||
|
// be used as bit-fields. Each non-zero value defined in this enum is
|
||||||
|
// a bit-mask. To extract the bit-field, for example, use an
|
||||||
|
// expression like:
|
||||||
|
//
|
||||||
|
// (span.flags & SPAN_FLAGS_TRACE_FLAGS_MASK)
|
||||||
|
//
|
||||||
|
// See https://www.w3.org/TR/trace-context-2/#trace-flags for the flag definitions.
|
||||||
|
//
|
||||||
|
// Note that Span flags were introduced in version 1.1 of the
|
||||||
|
// OpenTelemetry protocol. Older Span producers do not set this
|
||||||
|
// field, consequently consumers should not rely on the absence of a
|
||||||
|
// particular flag bit to indicate the presence of a particular feature.
|
||||||
|
type SpanFlags int32
|
||||||
|
|
||||||
|
const (
|
||||||
|
// The zero value for the enum. Should not be used for comparisons.
|
||||||
|
// Instead use bitwise "and" with the appropriate mask as shown above.
|
||||||
|
SpanFlags_SPAN_FLAGS_DO_NOT_USE SpanFlags = 0
|
||||||
|
// Bits 0-7 are used for trace flags.
|
||||||
|
SpanFlags_SPAN_FLAGS_TRACE_FLAGS_MASK SpanFlags = 255
|
||||||
|
)
|
||||||
|
|
||||||
|
// Enum value maps for SpanFlags.
|
||||||
|
var (
|
||||||
|
SpanFlags_name = map[int32]string{
|
||||||
|
0: "SPAN_FLAGS_DO_NOT_USE",
|
||||||
|
255: "SPAN_FLAGS_TRACE_FLAGS_MASK",
|
||||||
|
}
|
||||||
|
SpanFlags_value = map[string]int32{
|
||||||
|
"SPAN_FLAGS_DO_NOT_USE": 0,
|
||||||
|
"SPAN_FLAGS_TRACE_FLAGS_MASK": 255,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
func (x SpanFlags) Enum() *SpanFlags {
|
||||||
|
p := new(SpanFlags)
|
||||||
|
*p = x
|
||||||
|
return p
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x SpanFlags) String() string {
|
||||||
|
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||||
|
}
|
||||||
|
|
||||||
|
func (SpanFlags) Descriptor() protoreflect.EnumDescriptor {
|
||||||
|
return file_opentelemetry_proto_trace_v1_trace_proto_enumTypes[0].Descriptor()
|
||||||
|
}
|
||||||
|
|
||||||
|
func (SpanFlags) Type() protoreflect.EnumType {
|
||||||
|
return &file_opentelemetry_proto_trace_v1_trace_proto_enumTypes[0]
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x SpanFlags) Number() protoreflect.EnumNumber {
|
||||||
|
return protoreflect.EnumNumber(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use SpanFlags.Descriptor instead.
|
||||||
|
func (SpanFlags) EnumDescriptor() ([]byte, []int) {
|
||||||
|
return file_opentelemetry_proto_trace_v1_trace_proto_rawDescGZIP(), []int{0}
|
||||||
|
}
|
||||||
|
|
||||||
// SpanKind is the type of span. Can be used to specify additional relationships between spans
|
// SpanKind is the type of span. Can be used to specify additional relationships between spans
|
||||||
// in addition to a parent/child relationship.
|
// in addition to a parent/child relationship.
|
||||||
type Span_SpanKind int32
|
type Span_SpanKind int32
|
||||||
@ -94,11 +157,11 @@ func (x Span_SpanKind) String() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (Span_SpanKind) Descriptor() protoreflect.EnumDescriptor {
|
func (Span_SpanKind) Descriptor() protoreflect.EnumDescriptor {
|
||||||
return file_opentelemetry_proto_trace_v1_trace_proto_enumTypes[0].Descriptor()
|
return file_opentelemetry_proto_trace_v1_trace_proto_enumTypes[1].Descriptor()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (Span_SpanKind) Type() protoreflect.EnumType {
|
func (Span_SpanKind) Type() protoreflect.EnumType {
|
||||||
return &file_opentelemetry_proto_trace_v1_trace_proto_enumTypes[0]
|
return &file_opentelemetry_proto_trace_v1_trace_proto_enumTypes[1]
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x Span_SpanKind) Number() protoreflect.EnumNumber {
|
func (x Span_SpanKind) Number() protoreflect.EnumNumber {
|
||||||
@ -149,11 +212,11 @@ func (x Status_StatusCode) String() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (Status_StatusCode) Descriptor() protoreflect.EnumDescriptor {
|
func (Status_StatusCode) Descriptor() protoreflect.EnumDescriptor {
|
||||||
return file_opentelemetry_proto_trace_v1_trace_proto_enumTypes[1].Descriptor()
|
return file_opentelemetry_proto_trace_v1_trace_proto_enumTypes[2].Descriptor()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (Status_StatusCode) Type() protoreflect.EnumType {
|
func (Status_StatusCode) Type() protoreflect.EnumType {
|
||||||
return &file_opentelemetry_proto_trace_v1_trace_proto_enumTypes[1]
|
return &file_opentelemetry_proto_trace_v1_trace_proto_enumTypes[2]
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x Status_StatusCode) Number() protoreflect.EnumNumber {
|
func (x Status_StatusCode) Number() protoreflect.EnumNumber {
|
||||||
@ -238,6 +301,9 @@ type ResourceSpans struct {
|
|||||||
Resource *v1.Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
|
Resource *v1.Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
|
||||||
// A list of ScopeSpans that originate from a resource.
|
// A list of ScopeSpans that originate from a resource.
|
||||||
ScopeSpans []*ScopeSpans `protobuf:"bytes,2,rep,name=scope_spans,json=scopeSpans,proto3" json:"scope_spans,omitempty"`
|
ScopeSpans []*ScopeSpans `protobuf:"bytes,2,rep,name=scope_spans,json=scopeSpans,proto3" json:"scope_spans,omitempty"`
|
||||||
|
// The Schema URL, if known. This is the identifier of the Schema that the resource data
|
||||||
|
// is recorded in. To learn more about Schema URL see
|
||||||
|
// https://opentelemetry.io/docs/specs/otel/schemas/#schema-url
|
||||||
// This schema_url applies to the data in the "resource" field. It does not apply
|
// This schema_url applies to the data in the "resource" field. It does not apply
|
||||||
// to the data in the "scope_spans" field which have their own schema_url field.
|
// to the data in the "scope_spans" field which have their own schema_url field.
|
||||||
SchemaUrl string `protobuf:"bytes,3,opt,name=schema_url,json=schemaUrl,proto3" json:"schema_url,omitempty"`
|
SchemaUrl string `protobuf:"bytes,3,opt,name=schema_url,json=schemaUrl,proto3" json:"schema_url,omitempty"`
|
||||||
@ -308,6 +374,9 @@ type ScopeSpans struct {
|
|||||||
Scope *v11.InstrumentationScope `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope,omitempty"`
|
Scope *v11.InstrumentationScope `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope,omitempty"`
|
||||||
// A list of Spans that originate from an instrumentation scope.
|
// A list of Spans that originate from an instrumentation scope.
|
||||||
Spans []*Span `protobuf:"bytes,2,rep,name=spans,proto3" json:"spans,omitempty"`
|
Spans []*Span `protobuf:"bytes,2,rep,name=spans,proto3" json:"spans,omitempty"`
|
||||||
|
// The Schema URL, if known. This is the identifier of the Schema that the span data
|
||||||
|
// is recorded in. To learn more about Schema URL see
|
||||||
|
// https://opentelemetry.io/docs/specs/otel/schemas/#schema-url
|
||||||
// This schema_url applies to all spans and span events in the "spans" field.
|
// This schema_url applies to all spans and span events in the "spans" field.
|
||||||
SchemaUrl string `protobuf:"bytes,3,opt,name=schema_url,json=schemaUrl,proto3" json:"schema_url,omitempty"`
|
SchemaUrl string `protobuf:"bytes,3,opt,name=schema_url,json=schemaUrl,proto3" json:"schema_url,omitempty"`
|
||||||
}
|
}
|
||||||
@ -394,6 +463,21 @@ type Span struct {
|
|||||||
// The `span_id` of this span's parent span. If this is a root span, then this
|
// The `span_id` of this span's parent span. If this is a root span, then this
|
||||||
// field must be empty. The ID is an 8-byte array.
|
// field must be empty. The ID is an 8-byte array.
|
||||||
ParentSpanId []byte `protobuf:"bytes,4,opt,name=parent_span_id,json=parentSpanId,proto3" json:"parent_span_id,omitempty"`
|
ParentSpanId []byte `protobuf:"bytes,4,opt,name=parent_span_id,json=parentSpanId,proto3" json:"parent_span_id,omitempty"`
|
||||||
|
// Flags, a bit field. 8 least significant bits are the trace
|
||||||
|
// flags as defined in W3C Trace Context specification. Readers
|
||||||
|
// MUST not assume that 24 most significant bits will be zero.
|
||||||
|
// To read the 8-bit W3C trace flag, use `flags & SPAN_FLAGS_TRACE_FLAGS_MASK`.
|
||||||
|
//
|
||||||
|
// When creating span messages, if the message is logically forwarded from another source
|
||||||
|
// with an equivalent flags fields (i.e., usually another OTLP span message), the field SHOULD
|
||||||
|
// be copied as-is. If creating from a source that does not have an equivalent flags field
|
||||||
|
// (such as a runtime representation of an OpenTelemetry span), the high 24 bits MUST
|
||||||
|
// be set to zero.
|
||||||
|
//
|
||||||
|
// [Optional].
|
||||||
|
//
|
||||||
|
// See https://www.w3.org/TR/trace-context-2/#trace-flags for the flag definitions.
|
||||||
|
Flags uint32 `protobuf:"fixed32,16,opt,name=flags,proto3" json:"flags,omitempty"`
|
||||||
// A description of the span's operation.
|
// A description of the span's operation.
|
||||||
//
|
//
|
||||||
// For example, the name can be a qualified method name or a file name
|
// For example, the name can be a qualified method name or a file name
|
||||||
@ -517,6 +601,13 @@ func (x *Span) GetParentSpanId() []byte {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *Span) GetFlags() uint32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Flags
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
func (x *Span) GetName() string {
|
func (x *Span) GetName() string {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Name
|
return x.Name
|
||||||
@ -757,6 +848,15 @@ type Span_Link struct {
|
|||||||
// dropped_attributes_count is the number of dropped attributes. If the value is 0,
|
// dropped_attributes_count is the number of dropped attributes. If the value is 0,
|
||||||
// then no attributes were dropped.
|
// then no attributes were dropped.
|
||||||
DroppedAttributesCount uint32 `protobuf:"varint,5,opt,name=dropped_attributes_count,json=droppedAttributesCount,proto3" json:"dropped_attributes_count,omitempty"`
|
DroppedAttributesCount uint32 `protobuf:"varint,5,opt,name=dropped_attributes_count,json=droppedAttributesCount,proto3" json:"dropped_attributes_count,omitempty"`
|
||||||
|
// Flags, a bit field. 8 least significant bits are the trace
|
||||||
|
// flags as defined in W3C Trace Context specification. Readers
|
||||||
|
// MUST not assume that 24 most significant bits will be zero.
|
||||||
|
// When creating new spans, the most-significant 24-bits MUST be
|
||||||
|
// zero. To read the 8-bit W3C trace flag (use flags &
|
||||||
|
// SPAN_FLAGS_TRACE_FLAGS_MASK). [Optional].
|
||||||
|
//
|
||||||
|
// See https://www.w3.org/TR/trace-context-2/#trace-flags for the flag definitions.
|
||||||
|
Flags uint32 `protobuf:"fixed32,6,opt,name=flags,proto3" json:"flags,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Span_Link) Reset() {
|
func (x *Span_Link) Reset() {
|
||||||
@ -826,6 +926,13 @@ func (x *Span_Link) GetDroppedAttributesCount() uint32 {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *Span_Link) GetFlags() uint32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Flags
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
var File_opentelemetry_proto_trace_v1_trace_proto protoreflect.FileDescriptor
|
var File_opentelemetry_proto_trace_v1_trace_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
var file_opentelemetry_proto_trace_v1_trace_proto_rawDesc = []byte{
|
var file_opentelemetry_proto_trace_v1_trace_proto_rawDesc = []byte{
|
||||||
@ -869,7 +976,7 @@ var file_opentelemetry_proto_trace_v1_trace_proto_rawDesc = []byte{
|
|||||||
0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x70, 0x61, 0x6e, 0x52, 0x05,
|
0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x70, 0x61, 0x6e, 0x52, 0x05,
|
||||||
0x73, 0x70, 0x61, 0x6e, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f,
|
0x73, 0x70, 0x61, 0x6e, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f,
|
||||||
0x75, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x63, 0x68, 0x65, 0x6d,
|
0x75, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x63, 0x68, 0x65, 0x6d,
|
||||||
0x61, 0x55, 0x72, 0x6c, 0x22, 0x9c, 0x0a, 0x0a, 0x04, 0x53, 0x70, 0x61, 0x6e, 0x12, 0x19, 0x0a,
|
0x61, 0x55, 0x72, 0x6c, 0x22, 0xc8, 0x0a, 0x0a, 0x04, 0x53, 0x70, 0x61, 0x6e, 0x12, 0x19, 0x0a,
|
||||||
0x08, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52,
|
0x08, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52,
|
||||||
0x07, 0x74, 0x72, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x73, 0x70, 0x61, 0x6e,
|
0x07, 0x74, 0x72, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x73, 0x70, 0x61, 0x6e,
|
||||||
0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x73, 0x70, 0x61, 0x6e, 0x49,
|
0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x73, 0x70, 0x61, 0x6e, 0x49,
|
||||||
@ -877,101 +984,108 @@ var file_opentelemetry_proto_trace_v1_trace_proto_rawDesc = []byte{
|
|||||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x72, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61,
|
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x72, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61,
|
||||||
0x74, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x70, 0x61,
|
0x74, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x70, 0x61,
|
||||||
0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x70, 0x61, 0x72, 0x65,
|
0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x70, 0x61, 0x72, 0x65,
|
||||||
0x6e, 0x74, 0x53, 0x70, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,
|
0x6e, 0x74, 0x53, 0x70, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67,
|
||||||
0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3f, 0x0a, 0x04,
|
0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x07, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x12,
|
||||||
0x6b, 0x69, 0x6e, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x6f, 0x70, 0x65,
|
0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
|
||||||
0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
0x6d, 0x65, 0x12, 0x3f, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e,
|
||||||
0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x70, 0x61, 0x6e, 0x2e, 0x53,
|
0x32, 0x2b, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79,
|
||||||
0x70, 0x61, 0x6e, 0x4b, 0x69, 0x6e, 0x64, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x2f, 0x0a,
|
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e,
|
||||||
0x14, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x75, 0x6e, 0x69, 0x78,
|
0x53, 0x70, 0x61, 0x6e, 0x2e, 0x53, 0x70, 0x61, 0x6e, 0x4b, 0x69, 0x6e, 0x64, 0x52, 0x04, 0x6b,
|
||||||
0x5f, 0x6e, 0x61, 0x6e, 0x6f, 0x18, 0x07, 0x20, 0x01, 0x28, 0x06, 0x52, 0x11, 0x73, 0x74, 0x61,
|
0x69, 0x6e, 0x64, 0x12, 0x2f, 0x0a, 0x14, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d,
|
||||||
0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x78, 0x4e, 0x61, 0x6e, 0x6f, 0x12, 0x2b,
|
0x65, 0x5f, 0x75, 0x6e, 0x69, 0x78, 0x5f, 0x6e, 0x61, 0x6e, 0x6f, 0x18, 0x07, 0x20, 0x01, 0x28,
|
||||||
0x0a, 0x12, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x75, 0x6e, 0x69, 0x78, 0x5f,
|
0x06, 0x52, 0x11, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x78,
|
||||||
0x6e, 0x61, 0x6e, 0x6f, 0x18, 0x08, 0x20, 0x01, 0x28, 0x06, 0x52, 0x0f, 0x65, 0x6e, 0x64, 0x54,
|
0x4e, 0x61, 0x6e, 0x6f, 0x12, 0x2b, 0x0a, 0x12, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65,
|
||||||
0x69, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x78, 0x4e, 0x61, 0x6e, 0x6f, 0x12, 0x47, 0x0a, 0x0a, 0x61,
|
0x5f, 0x75, 0x6e, 0x69, 0x78, 0x5f, 0x6e, 0x61, 0x6e, 0x6f, 0x18, 0x08, 0x20, 0x01, 0x28, 0x06,
|
||||||
0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32,
|
0x52, 0x0f, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x78, 0x4e, 0x61, 0x6e,
|
||||||
0x27, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e,
|
0x6f, 0x12, 0x47, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18,
|
||||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e,
|
0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65,
|
||||||
0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62,
|
0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d,
|
||||||
0x75, 0x74, 0x65, 0x73, 0x12, 0x38, 0x0a, 0x18, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x5f,
|
0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a,
|
||||||
0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x38, 0x0a, 0x18, 0x64, 0x72,
|
||||||
0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x16, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x41,
|
0x6f, 0x70, 0x70, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73,
|
||||||
0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x40,
|
0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x16, 0x64, 0x72,
|
||||||
0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28,
|
0x6f, 0x70, 0x70, 0x65, 0x64, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x43,
|
||||||
0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70,
|
0x6f, 0x75, 0x6e, 0x74, 0x12, 0x40, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x0b,
|
||||||
0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x70,
|
0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d,
|
||||||
0x61, 0x6e, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73,
|
0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65,
|
||||||
0x12, 0x30, 0x0a, 0x14, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x5f, 0x65, 0x76, 0x65, 0x6e,
|
0x2e, 0x76, 0x31, 0x2e, 0x53, 0x70, 0x61, 0x6e, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06,
|
||||||
0x74, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x12,
|
0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65,
|
||||||
0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x43, 0x6f, 0x75,
|
0x64, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0c,
|
||||||
0x6e, 0x74, 0x12, 0x3d, 0x0a, 0x05, 0x6c, 0x69, 0x6e, 0x6b, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28,
|
0x20, 0x01, 0x28, 0x0d, 0x52, 0x12, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x45, 0x76, 0x65,
|
||||||
0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72,
|
0x6e, 0x74, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3d, 0x0a, 0x05, 0x6c, 0x69, 0x6e, 0x6b,
|
||||||
0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31,
|
0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65,
|
||||||
0x2e, 0x53, 0x70, 0x61, 0x6e, 0x2e, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x05, 0x6c, 0x69, 0x6e, 0x6b,
|
|
||||||
0x73, 0x12, 0x2e, 0x0a, 0x13, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x5f, 0x6c, 0x69, 0x6e,
|
|
||||||
0x6b, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x11,
|
|
||||||
0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x43, 0x6f, 0x75, 0x6e,
|
|
||||||
0x74, 0x12, 0x3c, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28,
|
|
||||||
0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72,
|
|
||||||
0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31,
|
|
||||||
0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x1a,
|
|
||||||
0xc4, 0x01, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x24, 0x0a, 0x0e, 0x74, 0x69, 0x6d,
|
|
||||||
0x65, 0x5f, 0x75, 0x6e, 0x69, 0x78, 0x5f, 0x6e, 0x61, 0x6e, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28,
|
|
||||||
0x06, 0x52, 0x0c, 0x74, 0x69, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x78, 0x4e, 0x61, 0x6e, 0x6f, 0x12,
|
|
||||||
0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
|
|
||||||
0x61, 0x6d, 0x65, 0x12, 0x47, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65,
|
|
||||||
0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65,
|
|
||||||
0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f,
|
|
||||||
0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65,
|
|
||||||
0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x38, 0x0a, 0x18,
|
|
||||||
0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74,
|
|
||||||
0x65, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x16,
|
|
||||||
0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65,
|
|
||||||
0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x1a, 0xde, 0x01, 0x0a, 0x04, 0x4c, 0x69, 0x6e, 0x6b, 0x12,
|
|
||||||
0x19, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
|
||||||
0x0c, 0x52, 0x07, 0x74, 0x72, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x73, 0x70,
|
|
||||||
0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x73, 0x70, 0x61,
|
|
||||||
0x6e, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x73, 0x74, 0x61,
|
|
||||||
0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x72, 0x61, 0x63, 0x65, 0x53,
|
|
||||||
0x74, 0x61, 0x74, 0x65, 0x12, 0x47, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74,
|
|
||||||
0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74,
|
|
||||||
0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63,
|
|
||||||
0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75,
|
|
||||||
0x65, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x38, 0x0a,
|
|
||||||
0x18, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75,
|
|
||||||
0x74, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52,
|
|
||||||
0x16, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74,
|
|
||||||
0x65, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x99, 0x01, 0x0a, 0x08, 0x53, 0x70, 0x61, 0x6e,
|
|
||||||
0x4b, 0x69, 0x6e, 0x64, 0x12, 0x19, 0x0a, 0x15, 0x53, 0x50, 0x41, 0x4e, 0x5f, 0x4b, 0x49, 0x4e,
|
|
||||||
0x44, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12,
|
|
||||||
0x16, 0x0a, 0x12, 0x53, 0x50, 0x41, 0x4e, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x49, 0x4e, 0x54,
|
|
||||||
0x45, 0x52, 0x4e, 0x41, 0x4c, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x50, 0x41, 0x4e, 0x5f,
|
|
||||||
0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x10, 0x02, 0x12, 0x14, 0x0a,
|
|
||||||
0x10, 0x53, 0x50, 0x41, 0x4e, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x43, 0x4c, 0x49, 0x45, 0x4e,
|
|
||||||
0x54, 0x10, 0x03, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x50, 0x41, 0x4e, 0x5f, 0x4b, 0x49, 0x4e, 0x44,
|
|
||||||
0x5f, 0x50, 0x52, 0x4f, 0x44, 0x55, 0x43, 0x45, 0x52, 0x10, 0x04, 0x12, 0x16, 0x0a, 0x12, 0x53,
|
|
||||||
0x50, 0x41, 0x4e, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x43, 0x4f, 0x4e, 0x53, 0x55, 0x4d, 0x45,
|
|
||||||
0x52, 0x10, 0x05, 0x22, 0xbd, 0x01, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18,
|
|
||||||
0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
|
||||||
0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x43, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65,
|
|
||||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c,
|
|
||||||
0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x72, 0x61,
|
|
||||||
0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x53, 0x74, 0x61,
|
|
||||||
0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x4e, 0x0a,
|
|
||||||
0x0a, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53,
|
|
||||||
0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x45, 0x54,
|
|
||||||
0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x4f, 0x44,
|
|
||||||
0x45, 0x5f, 0x4f, 0x4b, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53,
|
|
||||||
0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x4a, 0x04, 0x08,
|
|
||||||
0x01, 0x10, 0x02, 0x42, 0x77, 0x0a, 0x1f, 0x69, 0x6f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65,
|
|
||||||
0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x72,
|
0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x72,
|
||||||
0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x54, 0x72, 0x61, 0x63, 0x65, 0x50, 0x72, 0x6f,
|
0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x70, 0x61, 0x6e, 0x2e, 0x4c, 0x69, 0x6e, 0x6b,
|
||||||
0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, 0x67, 0x6f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c,
|
0x52, 0x05, 0x6c, 0x69, 0x6e, 0x6b, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x64, 0x72, 0x6f, 0x70, 0x70,
|
||||||
0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x69, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f,
|
0x65, 0x64, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0e,
|
||||||
0x6f, 0x74, 0x6c, 0x70, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x31, 0xaa, 0x02, 0x1c,
|
0x20, 0x01, 0x28, 0x0d, 0x52, 0x11, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x4c, 0x69, 0x6e,
|
||||||
0x4f, 0x70, 0x65, 0x6e, 0x54, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x50, 0x72,
|
0x6b, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3c, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75,
|
||||||
0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72,
|
0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65,
|
||||||
0x6f, 0x74, 0x6f, 0x33,
|
0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x72,
|
||||||
|
0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73,
|
||||||
|
0x74, 0x61, 0x74, 0x75, 0x73, 0x1a, 0xc4, 0x01, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12,
|
||||||
|
0x24, 0x0a, 0x0e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x75, 0x6e, 0x69, 0x78, 0x5f, 0x6e, 0x61, 0x6e,
|
||||||
|
0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x06, 0x52, 0x0c, 0x74, 0x69, 0x6d, 0x65, 0x55, 0x6e, 0x69,
|
||||||
|
0x78, 0x4e, 0x61, 0x6e, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20,
|
||||||
|
0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x47, 0x0a, 0x0a, 0x61, 0x74, 0x74,
|
||||||
|
0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e,
|
||||||
|
0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72,
|
||||||
|
0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65,
|
||||||
|
0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74,
|
||||||
|
0x65, 0x73, 0x12, 0x38, 0x0a, 0x18, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x5f, 0x61, 0x74,
|
||||||
|
0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04,
|
||||||
|
0x20, 0x01, 0x28, 0x0d, 0x52, 0x16, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x41, 0x74, 0x74,
|
||||||
|
0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x1a, 0xf4, 0x01, 0x0a,
|
||||||
|
0x04, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x69,
|
||||||
|
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x74, 0x72, 0x61, 0x63, 0x65, 0x49, 0x64,
|
||||||
|
0x12, 0x17, 0x0a, 0x07, 0x73, 0x70, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||||
|
0x0c, 0x52, 0x06, 0x73, 0x70, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x72, 0x61,
|
||||||
|
0x63, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a,
|
||||||
|
0x74, 0x72, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x47, 0x0a, 0x0a, 0x61, 0x74,
|
||||||
|
0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27,
|
||||||
|
0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70,
|
||||||
|
0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4b,
|
||||||
|
0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75,
|
||||||
|
0x74, 0x65, 0x73, 0x12, 0x38, 0x0a, 0x18, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x5f, 0x61,
|
||||||
|
0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18,
|
||||||
|
0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x16, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x41, 0x74,
|
||||||
|
0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a,
|
||||||
|
0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x07, 0x52, 0x05, 0x66, 0x6c,
|
||||||
|
0x61, 0x67, 0x73, 0x22, 0x99, 0x01, 0x0a, 0x08, 0x53, 0x70, 0x61, 0x6e, 0x4b, 0x69, 0x6e, 0x64,
|
||||||
|
0x12, 0x19, 0x0a, 0x15, 0x53, 0x50, 0x41, 0x4e, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x55, 0x4e,
|
||||||
|
0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x53,
|
||||||
|
0x50, 0x41, 0x4e, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41,
|
||||||
|
0x4c, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x50, 0x41, 0x4e, 0x5f, 0x4b, 0x49, 0x4e, 0x44,
|
||||||
|
0x5f, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x50, 0x41,
|
||||||
|
0x4e, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x10, 0x03, 0x12,
|
||||||
|
0x16, 0x0a, 0x12, 0x53, 0x50, 0x41, 0x4e, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x50, 0x52, 0x4f,
|
||||||
|
0x44, 0x55, 0x43, 0x45, 0x52, 0x10, 0x04, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x50, 0x41, 0x4e, 0x5f,
|
||||||
|
0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x43, 0x4f, 0x4e, 0x53, 0x55, 0x4d, 0x45, 0x52, 0x10, 0x05, 0x22,
|
||||||
|
0xbd, 0x01, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65,
|
||||||
|
0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73,
|
||||||
|
0x73, 0x61, 0x67, 0x65, 0x12, 0x43, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01,
|
||||||
|
0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74,
|
||||||
|
0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76,
|
||||||
|
0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43,
|
||||||
|
0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x4e, 0x0a, 0x0a, 0x53, 0x74, 0x61,
|
||||||
|
0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x55,
|
||||||
|
0x53, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x45, 0x54, 0x10, 0x00, 0x12, 0x12,
|
||||||
|
0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x4f, 0x4b,
|
||||||
|
0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x4f, 0x44,
|
||||||
|
0x45, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x2a,
|
||||||
|
0x48, 0x0a, 0x09, 0x53, 0x70, 0x61, 0x6e, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x19, 0x0a, 0x15,
|
||||||
|
0x53, 0x50, 0x41, 0x4e, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x53, 0x5f, 0x44, 0x4f, 0x5f, 0x4e, 0x4f,
|
||||||
|
0x54, 0x5f, 0x55, 0x53, 0x45, 0x10, 0x00, 0x12, 0x20, 0x0a, 0x1b, 0x53, 0x50, 0x41, 0x4e, 0x5f,
|
||||||
|
0x46, 0x4c, 0x41, 0x47, 0x53, 0x5f, 0x54, 0x52, 0x41, 0x43, 0x45, 0x5f, 0x46, 0x4c, 0x41, 0x47,
|
||||||
|
0x53, 0x5f, 0x4d, 0x41, 0x53, 0x4b, 0x10, 0xff, 0x01, 0x42, 0x77, 0x0a, 0x1f, 0x69, 0x6f, 0x2e,
|
||||||
|
0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72,
|
||||||
|
0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x54, 0x72,
|
||||||
|
0x61, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, 0x67, 0x6f, 0x2e, 0x6f,
|
||||||
|
0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x69, 0x6f, 0x2f,
|
||||||
|
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6f, 0x74, 0x6c, 0x70, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65,
|
||||||
|
0x2f, 0x76, 0x31, 0xaa, 0x02, 0x1c, 0x4f, 0x70, 0x65, 0x6e, 0x54, 0x65, 0x6c, 0x65, 0x6d, 0x65,
|
||||||
|
0x74, 0x72, 0x79, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x2e,
|
||||||
|
0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -986,36 +1100,37 @@ func file_opentelemetry_proto_trace_v1_trace_proto_rawDescGZIP() []byte {
|
|||||||
return file_opentelemetry_proto_trace_v1_trace_proto_rawDescData
|
return file_opentelemetry_proto_trace_v1_trace_proto_rawDescData
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_opentelemetry_proto_trace_v1_trace_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
|
var file_opentelemetry_proto_trace_v1_trace_proto_enumTypes = make([]protoimpl.EnumInfo, 3)
|
||||||
var file_opentelemetry_proto_trace_v1_trace_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
|
var file_opentelemetry_proto_trace_v1_trace_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
|
||||||
var file_opentelemetry_proto_trace_v1_trace_proto_goTypes = []interface{}{
|
var file_opentelemetry_proto_trace_v1_trace_proto_goTypes = []interface{}{
|
||||||
(Span_SpanKind)(0), // 0: opentelemetry.proto.trace.v1.Span.SpanKind
|
(SpanFlags)(0), // 0: opentelemetry.proto.trace.v1.SpanFlags
|
||||||
(Status_StatusCode)(0), // 1: opentelemetry.proto.trace.v1.Status.StatusCode
|
(Span_SpanKind)(0), // 1: opentelemetry.proto.trace.v1.Span.SpanKind
|
||||||
(*TracesData)(nil), // 2: opentelemetry.proto.trace.v1.TracesData
|
(Status_StatusCode)(0), // 2: opentelemetry.proto.trace.v1.Status.StatusCode
|
||||||
(*ResourceSpans)(nil), // 3: opentelemetry.proto.trace.v1.ResourceSpans
|
(*TracesData)(nil), // 3: opentelemetry.proto.trace.v1.TracesData
|
||||||
(*ScopeSpans)(nil), // 4: opentelemetry.proto.trace.v1.ScopeSpans
|
(*ResourceSpans)(nil), // 4: opentelemetry.proto.trace.v1.ResourceSpans
|
||||||
(*Span)(nil), // 5: opentelemetry.proto.trace.v1.Span
|
(*ScopeSpans)(nil), // 5: opentelemetry.proto.trace.v1.ScopeSpans
|
||||||
(*Status)(nil), // 6: opentelemetry.proto.trace.v1.Status
|
(*Span)(nil), // 6: opentelemetry.proto.trace.v1.Span
|
||||||
(*Span_Event)(nil), // 7: opentelemetry.proto.trace.v1.Span.Event
|
(*Status)(nil), // 7: opentelemetry.proto.trace.v1.Status
|
||||||
(*Span_Link)(nil), // 8: opentelemetry.proto.trace.v1.Span.Link
|
(*Span_Event)(nil), // 8: opentelemetry.proto.trace.v1.Span.Event
|
||||||
(*v1.Resource)(nil), // 9: opentelemetry.proto.resource.v1.Resource
|
(*Span_Link)(nil), // 9: opentelemetry.proto.trace.v1.Span.Link
|
||||||
(*v11.InstrumentationScope)(nil), // 10: opentelemetry.proto.common.v1.InstrumentationScope
|
(*v1.Resource)(nil), // 10: opentelemetry.proto.resource.v1.Resource
|
||||||
(*v11.KeyValue)(nil), // 11: opentelemetry.proto.common.v1.KeyValue
|
(*v11.InstrumentationScope)(nil), // 11: opentelemetry.proto.common.v1.InstrumentationScope
|
||||||
|
(*v11.KeyValue)(nil), // 12: opentelemetry.proto.common.v1.KeyValue
|
||||||
}
|
}
|
||||||
var file_opentelemetry_proto_trace_v1_trace_proto_depIdxs = []int32{
|
var file_opentelemetry_proto_trace_v1_trace_proto_depIdxs = []int32{
|
||||||
3, // 0: opentelemetry.proto.trace.v1.TracesData.resource_spans:type_name -> opentelemetry.proto.trace.v1.ResourceSpans
|
4, // 0: opentelemetry.proto.trace.v1.TracesData.resource_spans:type_name -> opentelemetry.proto.trace.v1.ResourceSpans
|
||||||
9, // 1: opentelemetry.proto.trace.v1.ResourceSpans.resource:type_name -> opentelemetry.proto.resource.v1.Resource
|
10, // 1: opentelemetry.proto.trace.v1.ResourceSpans.resource:type_name -> opentelemetry.proto.resource.v1.Resource
|
||||||
4, // 2: opentelemetry.proto.trace.v1.ResourceSpans.scope_spans:type_name -> opentelemetry.proto.trace.v1.ScopeSpans
|
5, // 2: opentelemetry.proto.trace.v1.ResourceSpans.scope_spans:type_name -> opentelemetry.proto.trace.v1.ScopeSpans
|
||||||
10, // 3: opentelemetry.proto.trace.v1.ScopeSpans.scope:type_name -> opentelemetry.proto.common.v1.InstrumentationScope
|
11, // 3: opentelemetry.proto.trace.v1.ScopeSpans.scope:type_name -> opentelemetry.proto.common.v1.InstrumentationScope
|
||||||
5, // 4: opentelemetry.proto.trace.v1.ScopeSpans.spans:type_name -> opentelemetry.proto.trace.v1.Span
|
6, // 4: opentelemetry.proto.trace.v1.ScopeSpans.spans:type_name -> opentelemetry.proto.trace.v1.Span
|
||||||
0, // 5: opentelemetry.proto.trace.v1.Span.kind:type_name -> opentelemetry.proto.trace.v1.Span.SpanKind
|
1, // 5: opentelemetry.proto.trace.v1.Span.kind:type_name -> opentelemetry.proto.trace.v1.Span.SpanKind
|
||||||
11, // 6: opentelemetry.proto.trace.v1.Span.attributes:type_name -> opentelemetry.proto.common.v1.KeyValue
|
12, // 6: opentelemetry.proto.trace.v1.Span.attributes:type_name -> opentelemetry.proto.common.v1.KeyValue
|
||||||
7, // 7: opentelemetry.proto.trace.v1.Span.events:type_name -> opentelemetry.proto.trace.v1.Span.Event
|
8, // 7: opentelemetry.proto.trace.v1.Span.events:type_name -> opentelemetry.proto.trace.v1.Span.Event
|
||||||
8, // 8: opentelemetry.proto.trace.v1.Span.links:type_name -> opentelemetry.proto.trace.v1.Span.Link
|
9, // 8: opentelemetry.proto.trace.v1.Span.links:type_name -> opentelemetry.proto.trace.v1.Span.Link
|
||||||
6, // 9: opentelemetry.proto.trace.v1.Span.status:type_name -> opentelemetry.proto.trace.v1.Status
|
7, // 9: opentelemetry.proto.trace.v1.Span.status:type_name -> opentelemetry.proto.trace.v1.Status
|
||||||
1, // 10: opentelemetry.proto.trace.v1.Status.code:type_name -> opentelemetry.proto.trace.v1.Status.StatusCode
|
2, // 10: opentelemetry.proto.trace.v1.Status.code:type_name -> opentelemetry.proto.trace.v1.Status.StatusCode
|
||||||
11, // 11: opentelemetry.proto.trace.v1.Span.Event.attributes:type_name -> opentelemetry.proto.common.v1.KeyValue
|
12, // 11: opentelemetry.proto.trace.v1.Span.Event.attributes:type_name -> opentelemetry.proto.common.v1.KeyValue
|
||||||
11, // 12: opentelemetry.proto.trace.v1.Span.Link.attributes:type_name -> opentelemetry.proto.common.v1.KeyValue
|
12, // 12: opentelemetry.proto.trace.v1.Span.Link.attributes:type_name -> opentelemetry.proto.common.v1.KeyValue
|
||||||
13, // [13:13] is the sub-list for method output_type
|
13, // [13:13] is the sub-list for method output_type
|
||||||
13, // [13:13] is the sub-list for method input_type
|
13, // [13:13] is the sub-list for method input_type
|
||||||
13, // [13:13] is the sub-list for extension type_name
|
13, // [13:13] is the sub-list for extension type_name
|
||||||
@ -1119,7 +1234,7 @@ func file_opentelemetry_proto_trace_v1_trace_proto_init() {
|
|||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: file_opentelemetry_proto_trace_v1_trace_proto_rawDesc,
|
RawDescriptor: file_opentelemetry_proto_trace_v1_trace_proto_rawDesc,
|
||||||
NumEnums: 2,
|
NumEnums: 3,
|
||||||
NumMessages: 7,
|
NumMessages: 7,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 0,
|
NumServices: 0,
|
||||||
|
41
vendor/modules.txt
vendored
41
vendor/modules.txt
vendored
@ -195,7 +195,7 @@ github.com/docker/go-units
|
|||||||
## explicit; go 1.13
|
## explicit; go 1.13
|
||||||
github.com/emicklei/go-restful/v3
|
github.com/emicklei/go-restful/v3
|
||||||
github.com/emicklei/go-restful/v3/log
|
github.com/emicklei/go-restful/v3/log
|
||||||
# github.com/felixge/httpsnoop v1.0.3
|
# github.com/felixge/httpsnoop v1.0.4
|
||||||
## explicit; go 1.13
|
## explicit; go 1.13
|
||||||
github.com/felixge/httpsnoop
|
github.com/felixge/httpsnoop
|
||||||
# github.com/fsnotify/fsnotify v1.7.0
|
# github.com/fsnotify/fsnotify v1.7.0
|
||||||
@ -248,8 +248,8 @@ github.com/grpc-ecosystem/go-grpc-middleware
|
|||||||
# github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
|
# github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
|
||||||
## explicit
|
## explicit
|
||||||
github.com/grpc-ecosystem/go-grpc-prometheus
|
github.com/grpc-ecosystem/go-grpc-prometheus
|
||||||
# github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.2
|
# github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0
|
||||||
## explicit; go 1.17
|
## explicit; go 1.19
|
||||||
github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule
|
github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule
|
||||||
github.com/grpc-ecosystem/grpc-gateway/v2/runtime
|
github.com/grpc-ecosystem/grpc-gateway/v2/runtime
|
||||||
github.com/grpc-ecosystem/grpc-gateway/v2/utilities
|
github.com/grpc-ecosystem/grpc-gateway/v2/utilities
|
||||||
@ -402,15 +402,15 @@ go.opencensus.io/internal
|
|||||||
go.opencensus.io/trace
|
go.opencensus.io/trace
|
||||||
go.opencensus.io/trace/internal
|
go.opencensus.io/trace/internal
|
||||||
go.opencensus.io/trace/tracestate
|
go.opencensus.io/trace/tracestate
|
||||||
# go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1
|
# go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.48.0
|
||||||
## explicit; go 1.20
|
## explicit; go 1.20
|
||||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc
|
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc
|
||||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/internal
|
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/internal
|
||||||
# go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0
|
# go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.48.0
|
||||||
## explicit; go 1.19
|
## explicit; go 1.20
|
||||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp
|
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp
|
||||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil
|
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil
|
||||||
# go.opentelemetry.io/otel v1.21.0
|
# go.opentelemetry.io/otel v1.23.1
|
||||||
## explicit; go 1.20
|
## explicit; go 1.20
|
||||||
go.opentelemetry.io/otel
|
go.opentelemetry.io/otel
|
||||||
go.opentelemetry.io/otel/attribute
|
go.opentelemetry.io/otel/attribute
|
||||||
@ -422,30 +422,33 @@ go.opentelemetry.io/otel/internal/baggage
|
|||||||
go.opentelemetry.io/otel/internal/global
|
go.opentelemetry.io/otel/internal/global
|
||||||
go.opentelemetry.io/otel/propagation
|
go.opentelemetry.io/otel/propagation
|
||||||
go.opentelemetry.io/otel/semconv/v1.17.0
|
go.opentelemetry.io/otel/semconv/v1.17.0
|
||||||
|
go.opentelemetry.io/otel/semconv/v1.20.0
|
||||||
go.opentelemetry.io/otel/semconv/v1.21.0
|
go.opentelemetry.io/otel/semconv/v1.21.0
|
||||||
# go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0
|
go.opentelemetry.io/otel/semconv/v1.24.0
|
||||||
|
# go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.23.1
|
||||||
## explicit; go 1.20
|
## explicit; go 1.20
|
||||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace
|
go.opentelemetry.io/otel/exporters/otlp/otlptrace
|
||||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform
|
go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform
|
||||||
# go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0
|
# go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.23.1
|
||||||
## explicit; go 1.20
|
## explicit; go 1.20
|
||||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc
|
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc
|
||||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal
|
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal
|
||||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/envconfig
|
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/envconfig
|
||||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig
|
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig
|
||||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/retry
|
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/retry
|
||||||
# go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0
|
# go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.23.1
|
||||||
## explicit; go 1.20
|
## explicit; go 1.20
|
||||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp
|
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp
|
||||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal
|
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal
|
||||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/envconfig
|
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/envconfig
|
||||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig
|
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig
|
||||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/retry
|
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/retry
|
||||||
# go.opentelemetry.io/otel/metric v1.21.0
|
# go.opentelemetry.io/otel/metric v1.23.1
|
||||||
## explicit; go 1.20
|
## explicit; go 1.20
|
||||||
go.opentelemetry.io/otel/metric
|
go.opentelemetry.io/otel/metric
|
||||||
go.opentelemetry.io/otel/metric/embedded
|
go.opentelemetry.io/otel/metric/embedded
|
||||||
# go.opentelemetry.io/otel/sdk v1.21.0
|
go.opentelemetry.io/otel/metric/noop
|
||||||
|
# go.opentelemetry.io/otel/sdk v1.23.1
|
||||||
## explicit; go 1.20
|
## explicit; go 1.20
|
||||||
go.opentelemetry.io/otel/sdk
|
go.opentelemetry.io/otel/sdk
|
||||||
go.opentelemetry.io/otel/sdk/instrumentation
|
go.opentelemetry.io/otel/sdk/instrumentation
|
||||||
@ -454,12 +457,12 @@ go.opentelemetry.io/otel/sdk/internal/env
|
|||||||
go.opentelemetry.io/otel/sdk/resource
|
go.opentelemetry.io/otel/sdk/resource
|
||||||
go.opentelemetry.io/otel/sdk/trace
|
go.opentelemetry.io/otel/sdk/trace
|
||||||
go.opentelemetry.io/otel/sdk/trace/tracetest
|
go.opentelemetry.io/otel/sdk/trace/tracetest
|
||||||
# go.opentelemetry.io/otel/trace v1.21.0
|
# go.opentelemetry.io/otel/trace v1.23.1
|
||||||
## explicit; go 1.20
|
## explicit; go 1.20
|
||||||
go.opentelemetry.io/otel/trace
|
go.opentelemetry.io/otel/trace
|
||||||
go.opentelemetry.io/otel/trace/embedded
|
go.opentelemetry.io/otel/trace/embedded
|
||||||
go.opentelemetry.io/otel/trace/noop
|
go.opentelemetry.io/otel/trace/noop
|
||||||
# go.opentelemetry.io/proto/otlp v1.0.0
|
# go.opentelemetry.io/proto/otlp v1.1.0
|
||||||
## explicit; go 1.17
|
## explicit; go 1.17
|
||||||
go.opentelemetry.io/proto/otlp/collector/trace/v1
|
go.opentelemetry.io/proto/otlp/collector/trace/v1
|
||||||
go.opentelemetry.io/proto/otlp/common/v1
|
go.opentelemetry.io/proto/otlp/common/v1
|
||||||
@ -473,7 +476,7 @@ golang.org/x/exp/slices
|
|||||||
# golang.org/x/mod v0.14.0
|
# golang.org/x/mod v0.14.0
|
||||||
## explicit; go 1.18
|
## explicit; go 1.18
|
||||||
golang.org/x/mod/semver
|
golang.org/x/mod/semver
|
||||||
# golang.org/x/net v0.19.0
|
# golang.org/x/net v0.20.0
|
||||||
## explicit; go 1.18
|
## explicit; go 1.18
|
||||||
golang.org/x/net/context
|
golang.org/x/net/context
|
||||||
golang.org/x/net/http/httpguts
|
golang.org/x/net/http/httpguts
|
||||||
@ -485,7 +488,7 @@ golang.org/x/net/internal/timeseries
|
|||||||
golang.org/x/net/proxy
|
golang.org/x/net/proxy
|
||||||
golang.org/x/net/trace
|
golang.org/x/net/trace
|
||||||
golang.org/x/net/websocket
|
golang.org/x/net/websocket
|
||||||
# golang.org/x/oauth2 v0.14.0
|
# golang.org/x/oauth2 v0.15.0
|
||||||
## explicit; go 1.18
|
## explicit; go 1.18
|
||||||
golang.org/x/oauth2
|
golang.org/x/oauth2
|
||||||
golang.org/x/oauth2/internal
|
golang.org/x/oauth2/internal
|
||||||
@ -503,7 +506,7 @@ golang.org/x/sys/windows/registry
|
|||||||
golang.org/x/sys/windows/svc
|
golang.org/x/sys/windows/svc
|
||||||
golang.org/x/sys/windows/svc/debug
|
golang.org/x/sys/windows/svc/debug
|
||||||
golang.org/x/sys/windows/svc/mgr
|
golang.org/x/sys/windows/svc/mgr
|
||||||
# golang.org/x/term v0.15.0
|
# golang.org/x/term v0.16.0
|
||||||
## explicit; go 1.18
|
## explicit; go 1.18
|
||||||
golang.org/x/term
|
golang.org/x/term
|
||||||
# golang.org/x/text v0.14.0
|
# golang.org/x/text v0.14.0
|
||||||
@ -544,10 +547,10 @@ google.golang.org/appengine/internal/log
|
|||||||
google.golang.org/appengine/internal/remote_api
|
google.golang.org/appengine/internal/remote_api
|
||||||
google.golang.org/appengine/internal/urlfetch
|
google.golang.org/appengine/internal/urlfetch
|
||||||
google.golang.org/appengine/urlfetch
|
google.golang.org/appengine/urlfetch
|
||||||
# google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17
|
# google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917
|
||||||
## explicit; go 1.19
|
## explicit; go 1.19
|
||||||
google.golang.org/genproto/googleapis/api/httpbody
|
google.golang.org/genproto/googleapis/api/httpbody
|
||||||
# google.golang.org/genproto/googleapis/rpc v0.0.0-20231212172506-995d672761c0
|
# google.golang.org/genproto/googleapis/rpc v0.0.0-20240102182953-50ed04b92917
|
||||||
## explicit; go 1.19
|
## explicit; go 1.19
|
||||||
google.golang.org/genproto/googleapis/rpc/code
|
google.golang.org/genproto/googleapis/rpc/code
|
||||||
google.golang.org/genproto/googleapis/rpc/errdetails
|
google.golang.org/genproto/googleapis/rpc/errdetails
|
||||||
|
Loading…
Reference in New Issue
Block a user