mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-31 23:58:03 +08:00
vendor: github.com/moby/buildkit v0.13.0-rc2
full diff: https://github.com/moby/buildkit/compare/8e3fe35738c2...v0.13.0-rc2 Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
5
vendor/go.opentelemetry.io/otel/.gitignore
generated
vendored
5
vendor/go.opentelemetry.io/otel/.gitignore
generated
vendored
@@ -14,12 +14,9 @@ go.work.sum
|
||||
gen/
|
||||
|
||||
/example/dice/dice
|
||||
/example/fib/fib
|
||||
/example/fib/traces.txt
|
||||
/example/jaeger/jaeger
|
||||
/example/namedtracer/namedtracer
|
||||
/example/otel-collector/otel-collector
|
||||
/example/opencensus/opencensus
|
||||
/example/passthrough/passthrough
|
||||
/example/prometheus/prometheus
|
||||
/example/zipkin/zipkin
|
||||
/example/otel-collector/otel-collector
|
||||
|
17
vendor/go.opentelemetry.io/otel/.golangci.yml
generated
vendored
17
vendor/go.opentelemetry.io/otel/.golangci.yml
generated
vendored
@@ -12,8 +12,9 @@ linters:
|
||||
- depguard
|
||||
- errcheck
|
||||
- godot
|
||||
- gofmt
|
||||
- gofumpt
|
||||
- goimports
|
||||
- gosec
|
||||
- gosimple
|
||||
- govet
|
||||
- ineffassign
|
||||
@@ -53,6 +54,20 @@ issues:
|
||||
text: "calls to (.+) only in main[(][)] or init[(][)] functions"
|
||||
linters:
|
||||
- revive
|
||||
# It's okay to not run gosec in a test.
|
||||
- path: _test\.go
|
||||
linters:
|
||||
- gosec
|
||||
# Igonoring gosec G404: Use of weak random number generator (math/rand instead of crypto/rand)
|
||||
# as we commonly use it in tests and examples.
|
||||
- text: "G404:"
|
||||
linters:
|
||||
- gosec
|
||||
# Igonoring gosec G402: TLS MinVersion too low
|
||||
# as the https://pkg.go.dev/crypto/tls#Config handles MinVersion default well.
|
||||
- text: "G402: TLS MinVersion too low."
|
||||
linters:
|
||||
- gosec
|
||||
include:
|
||||
# revive exported should have comment or be unexported.
|
||||
- EXC0012
|
||||
|
85
vendor/go.opentelemetry.io/otel/CHANGELOG.md
generated
vendored
85
vendor/go.opentelemetry.io/otel/CHANGELOG.md
generated
vendored
@@ -8,6 +8,85 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [1.21.0/0.44.0] 2023-11-16
|
||||
|
||||
### Removed
|
||||
|
||||
- Remove the deprecated `go.opentelemetry.io/otel/bridge/opencensus.NewTracer`. (#4706)
|
||||
- Remove the deprecated `go.opentelemetry.io/otel/exporters/otlp/otlpmetric` module. (#4707)
|
||||
- Remove the deprecated `go.opentelemetry.io/otel/example/view` module. (#4708)
|
||||
- Remove the deprecated `go.opentelemetry.io/otel/example/fib` module. (#4723)
|
||||
|
||||
### Fixed
|
||||
|
||||
- Do not parse non-protobuf responses in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#4719)
|
||||
- Do not parse non-protobuf responses in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. (#4719)
|
||||
|
||||
## [1.20.0/0.43.0] 2023-11-10
|
||||
|
||||
This release brings a breaking change for custom trace API implementations. Some interfaces (`TracerProvider`, `Tracer`, `Span`) now embed the `go.opentelemetry.io/otel/trace/embedded` types. Implementors need to update their implementations based on what they want the default behavior to be. See the "API Implementations" section of the [trace API] package documentation for more information about how to accomplish this.
|
||||
|
||||
### Added
|
||||
|
||||
- Add `go.opentelemetry.io/otel/bridge/opencensus.InstallTraceBridge`, which installs the OpenCensus trace bridge, and replaces `opencensus.NewTracer`. (#4567)
|
||||
- Add scope version to trace and metric bridges in `go.opentelemetry.io/otel/bridge/opencensus`. (#4584)
|
||||
- Add the `go.opentelemetry.io/otel/trace/embedded` package to be embedded in the exported trace API interfaces. (#4620)
|
||||
- Add the `go.opentelemetry.io/otel/trace/noop` package as a default no-op implementation of the trace API. (#4620)
|
||||
- Add context propagation in `go.opentelemetry.io/otel/example/dice`. (#4644)
|
||||
- Add view configuration to `go.opentelemetry.io/otel/example/prometheus`. (#4649)
|
||||
- Add `go.opentelemetry.io/otel/metric.WithExplicitBucketBoundaries`, which allows defining default explicit bucket boundaries when creating histogram instruments. (#4603)
|
||||
- Add `Version` function in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`. (#4660)
|
||||
- Add `Version` function in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#4660)
|
||||
- Add Summary, SummaryDataPoint, and QuantileValue to `go.opentelemetry.io/sdk/metric/metricdata`. (#4622)
|
||||
- `go.opentelemetry.io/otel/bridge/opencensus.NewMetricProducer` now supports exemplars from OpenCensus. (#4585)
|
||||
- Add support for `WithExplicitBucketBoundaries` in `go.opentelemetry.io/otel/sdk/metric`. (#4605)
|
||||
- Add support for Summary metrics in `go.opentelemetry.io/otel/bridge/opencensus`. (#4668)
|
||||
|
||||
### Deprecated
|
||||
|
||||
- Deprecate `go.opentelemetry.io/otel/bridge/opencensus.NewTracer` in favor of `opencensus.InstallTraceBridge`. (#4567)
|
||||
- Deprecate `go.opentelemetry.io/otel/example/fib` package is in favor of `go.opentelemetry.io/otel/example/dice`. (#4618)
|
||||
- Deprecate `go.opentelemetry.io/otel/trace.NewNoopTracerProvider`.
|
||||
Use the added `NewTracerProvider` function in `go.opentelemetry.io/otel/trace/noop` instead. (#4620)
|
||||
- Deprecate `go.opentelemetry.io/otel/example/view` package in favor of `go.opentelemetry.io/otel/example/prometheus`. (#4649)
|
||||
- Deprecate `go.opentelemetry.io/otel/exporters/otlp/otlpmetric`. (#4693)
|
||||
|
||||
### Changed
|
||||
|
||||
- `go.opentelemetry.io/otel/bridge/opencensus.NewMetricProducer` returns a `*MetricProducer` struct instead of the metric.Producer interface. (#4583)
|
||||
- The `TracerProvider` in `go.opentelemetry.io/otel/trace` now embeds the `go.opentelemetry.io/otel/trace/embedded.TracerProvider` type.
|
||||
This extends the `TracerProvider` interface and is is a breaking change for any existing implementation.
|
||||
Implementors need to update their implementations based on what they want the default behavior of the interface to be.
|
||||
See the "API Implementations" section of the `go.opentelemetry.io/otel/trace` package documentation for more information about how to accomplish this. (#4620)
|
||||
- The `Tracer` in `go.opentelemetry.io/otel/trace` now embeds the `go.opentelemetry.io/otel/trace/embedded.Tracer` type.
|
||||
This extends the `Tracer` interface and is is a breaking change for any existing implementation.
|
||||
Implementors need to update their implementations based on what they want the default behavior of the interface to be.
|
||||
See the "API Implementations" section of the `go.opentelemetry.io/otel/trace` package documentation for more information about how to accomplish this. (#4620)
|
||||
- The `Span` in `go.opentelemetry.io/otel/trace` now embeds the `go.opentelemetry.io/otel/trace/embedded.Span` type.
|
||||
This extends the `Span` interface and is is a breaking change for any existing implementation.
|
||||
Implementors need to update their implementations based on what they want the default behavior of the interface to be.
|
||||
See the "API Implementations" section of the `go.opentelemetry.io/otel/trace` package documentation for more information about how to accomplish this. (#4620)
|
||||
- `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` does no longer depend on `go.opentelemetry.io/otel/exporters/otlp/otlpmetric`. (#4660)
|
||||
- `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp` does no longer depend on `go.opentelemetry.io/otel/exporters/otlp/otlpmetric`. (#4660)
|
||||
- Retry for `502 Bad Gateway` and `504 Gateway Timeout` HTTP statuses in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#4670)
|
||||
- Retry for `502 Bad Gateway` and `504 Gateway Timeout` HTTP statuses in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. (#4670)
|
||||
- Retry for `RESOURCE_EXHAUSTED` only if RetryInfo is returned in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`. (#4669)
|
||||
- Retry for `RESOURCE_EXHAUSTED` only if RetryInfo is returned in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`. (#4669)
|
||||
- Retry temporary HTTP request failures in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#4679)
|
||||
- Retry temporary HTTP request failures in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. (#4679)
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix improper parsing of characters such us `+`, `/` by `Parse` in `go.opentelemetry.io/otel/baggage` as they were rendered as a whitespace. (#4667)
|
||||
- Fix improper parsing of characters such us `+`, `/` passed via `OTEL_RESOURCE_ATTRIBUTES` in `go.opentelemetry.io/otel/sdk/resource` as they were rendered as a whitespace. (#4699)
|
||||
- Fix improper parsing of characters such us `+`, `/` passed via `OTEL_EXPORTER_OTLP_HEADERS` and `OTEL_EXPORTER_OTLP_METRICS_HEADERS` in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` as they were rendered as a whitespace. (#4699)
|
||||
- Fix improper parsing of characters such us `+`, `/` passed via `OTEL_EXPORTER_OTLP_HEADERS` and `OTEL_EXPORTER_OTLP_METRICS_HEADERS` in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp` as they were rendered as a whitespace. (#4699)
|
||||
- Fix improper parsing of characters such us `+`, `/` passed via `OTEL_EXPORTER_OTLP_HEADERS` and `OTEL_EXPORTER_OTLP_TRACES_HEADERS` in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlptracegrpc` as they were rendered as a whitespace. (#4699)
|
||||
- Fix improper parsing of characters such us `+`, `/` passed via `OTEL_EXPORTER_OTLP_HEADERS` and `OTEL_EXPORTER_OTLP_TRACES_HEADERS` in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlptracehttp` as they were rendered as a whitespace. (#4699)
|
||||
- In `go.opentelemetry.op/otel/exporters/prometheus`, the exporter no longer `Collect`s metrics after `Shutdown` is invoked. (#4648)
|
||||
- Fix documentation for `WithCompressor` in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`. (#4695)
|
||||
- Fix documentation for `WithCompressor` in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`. (#4695)
|
||||
|
||||
## [1.19.0/0.42.0/0.0.7] 2023-09-28
|
||||
|
||||
This release contains the first stable release of the OpenTelemetry Go [metric SDK].
|
||||
@@ -2656,7 +2735,9 @@ It contains api and sdk for trace and meter.
|
||||
- CircleCI build CI manifest files.
|
||||
- CODEOWNERS file to track owners of this project.
|
||||
|
||||
[Unreleased]: https://github.com/open-telemetry/opentelemetry-go/compare/v1.19.0...HEAD
|
||||
[Unreleased]: https://github.com/open-telemetry/opentelemetry-go/compare/v1.21.0...HEAD
|
||||
[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.19.0/0.42.0/0.0.7]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.19.0
|
||||
[1.19.0-rc.1/0.42.0-rc.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.19.0-rc.1
|
||||
[1.18.0/0.41.0/0.0.6]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.18.0
|
||||
@@ -2731,7 +2812,7 @@ It contains api and sdk for trace and meter.
|
||||
[Go 1.20]: https://go.dev/doc/go1.20
|
||||
[Go 1.19]: https://go.dev/doc/go1.19
|
||||
[Go 1.18]: https://go.dev/doc/go1.18
|
||||
[Go 1.19]: https://go.dev/doc/go1.19
|
||||
|
||||
[metric API]:https://pkg.go.dev/go.opentelemetry.io/otel/metric
|
||||
[metric SDK]:https://pkg.go.dev/go.opentelemetry.io/otel/sdk/metric
|
||||
[trace API]:https://pkg.go.dev/go.opentelemetry.io/otel/trace
|
||||
|
4
vendor/go.opentelemetry.io/otel/CONTRIBUTING.md
generated
vendored
4
vendor/go.opentelemetry.io/otel/CONTRIBUTING.md
generated
vendored
@@ -90,6 +90,10 @@ git push <YOUR_FORK> <YOUR_BRANCH_NAME>
|
||||
Open a pull request against the main `opentelemetry-go` repo. Be sure to add the pull
|
||||
request ID to the entry you added to `CHANGELOG.md`.
|
||||
|
||||
Avoid rebasing and force-pushing to your branch to facilitate reviewing the pull request.
|
||||
Rewriting Git history makes it difficult to keep track of iterations during code review.
|
||||
All pull requests are squashed to a single commit upon merge to `main`.
|
||||
|
||||
### How to Receive Comments
|
||||
|
||||
* If the PR is not ready for review, please put `[WIP]` in the title,
|
||||
|
29
vendor/go.opentelemetry.io/otel/Makefile
generated
vendored
29
vendor/go.opentelemetry.io/otel/Makefile
generated
vendored
@@ -77,6 +77,9 @@ $(GOTMPL): PACKAGE=go.opentelemetry.io/build-tools/gotmpl
|
||||
GORELEASE = $(TOOLS)/gorelease
|
||||
$(GORELEASE): PACKAGE=golang.org/x/exp/cmd/gorelease
|
||||
|
||||
GOVULNCHECK = $(TOOLS)/govulncheck
|
||||
$(TOOLS)/govulncheck: PACKAGE=golang.org/x/vuln/cmd/govulncheck
|
||||
|
||||
.PHONY: tools
|
||||
tools: $(CROSSLINK) $(DBOTCONF) $(GOLANGCI_LINT) $(MISSPELL) $(GOCOVMERGE) $(STRINGER) $(PORTO) $(GOJQ) $(SEMCONVGEN) $(MULTIMOD) $(SEMCONVKIT) $(GOTMPL) $(GORELEASE)
|
||||
|
||||
@@ -189,6 +192,18 @@ test-coverage: | $(GOCOVMERGE)
|
||||
done; \
|
||||
$(GOCOVMERGE) $$(find . -name coverage.out) > coverage.txt
|
||||
|
||||
# Adding a directory will include all benchmarks in that direcotry if a filter is not specified.
|
||||
BENCHMARK_TARGETS := sdk/trace
|
||||
.PHONY: benchmark
|
||||
benchmark: $(BENCHMARK_TARGETS:%=benchmark/%)
|
||||
BENCHMARK_FILTER = .
|
||||
# You can override the filter for a particular directory by adding a rule here.
|
||||
benchmark/sdk/trace: BENCHMARK_FILTER = SpanWithAttributes_8/AlwaysSample
|
||||
benchmark/%:
|
||||
@echo "$(GO) test -timeout $(TIMEOUT)s -run=xxxxxMatchNothingxxxxx -bench=$(BENCHMARK_FILTER) $*..." \
|
||||
&& cd $* \
|
||||
$(foreach filter, $(BENCHMARK_FILTER), && $(GO) test -timeout $(TIMEOUT)s -run=xxxxxMatchNothingxxxxx -bench=$(filter))
|
||||
|
||||
.PHONY: golangci-lint golangci-lint-fix
|
||||
golangci-lint-fix: ARGS=--fix
|
||||
golangci-lint-fix: golangci-lint
|
||||
@@ -216,7 +231,7 @@ go-mod-tidy/%: | crosslink
|
||||
lint-modules: go-mod-tidy
|
||||
|
||||
.PHONY: lint
|
||||
lint: misspell lint-modules golangci-lint
|
||||
lint: misspell lint-modules golangci-lint govulncheck
|
||||
|
||||
.PHONY: vanity-import-check
|
||||
vanity-import-check: | $(PORTO)
|
||||
@@ -226,6 +241,14 @@ vanity-import-check: | $(PORTO)
|
||||
misspell: | $(MISSPELL)
|
||||
@$(MISSPELL) -w $(ALL_DOCS)
|
||||
|
||||
.PHONY: govulncheck
|
||||
govulncheck: $(OTEL_GO_MOD_DIRS:%=govulncheck/%)
|
||||
govulncheck/%: DIR=$*
|
||||
govulncheck/%: | $(GOVULNCHECK)
|
||||
@echo "govulncheck ./... in $(DIR)" \
|
||||
&& cd $(DIR) \
|
||||
&& $(GOVULNCHECK) ./...
|
||||
|
||||
.PHONY: codespell
|
||||
codespell: | $(CODESPELL)
|
||||
@$(DOCKERPY) $(CODESPELL)
|
||||
@@ -289,3 +312,7 @@ COMMIT ?= "HEAD"
|
||||
add-tags: | $(MULTIMOD)
|
||||
@[ "${MODSET}" ] || ( echo ">> env var MODSET is not set"; exit 1 )
|
||||
$(MULTIMOD) verify && $(MULTIMOD) tag -m ${MODSET} -c ${COMMIT}
|
||||
|
||||
.PHONY: lint-markdown
|
||||
lint-markdown:
|
||||
docker run -v "$(CURDIR):$(WORKDIR)" docker://avtodev/markdown-lint:v1 -c $(WORKDIR)/.markdownlint.yaml $(WORKDIR)/**/*.md
|
||||
|
15
vendor/go.opentelemetry.io/otel/README.md
generated
vendored
15
vendor/go.opentelemetry.io/otel/README.md
generated
vendored
@@ -11,16 +11,13 @@ It provides a set of APIs to directly measure performance and behavior of your s
|
||||
|
||||
## Project Status
|
||||
|
||||
| Signal | Status | Project |
|
||||
|---------|------------|-----------------------|
|
||||
| Traces | Stable | N/A |
|
||||
| Metrics | Mixed [1] | [Go: Metric SDK (GA)] |
|
||||
| Logs | Frozen [2] | N/A |
|
||||
| Signal | Status |
|
||||
|---------|------------|
|
||||
| Traces | Stable |
|
||||
| Metrics | Stable |
|
||||
| Logs | Design [1] |
|
||||
|
||||
[Go: Metric SDK (GA)]: https://github.com/orgs/open-telemetry/projects/34
|
||||
|
||||
- [1]: [Metrics API](https://pkg.go.dev/go.opentelemetry.io/otel/metric) is Stable. [Metrics SDK](https://pkg.go.dev/go.opentelemetry.io/otel/sdk/metric) is Beta.
|
||||
- [2]: The Logs signal development is halted for this project while we stabilize the Metrics SDK.
|
||||
- [1]: Currently the logs signal development is in a design phase ([#4696](https://github.com/open-telemetry/opentelemetry-go/issues/4696)).
|
||||
No Logs Pull Requests are currently being accepted.
|
||||
|
||||
Progress and status specific to this repository is tracked in our
|
||||
|
4
vendor/go.opentelemetry.io/otel/baggage/baggage.go
generated
vendored
4
vendor/go.opentelemetry.io/otel/baggage/baggage.go
generated
vendored
@@ -254,7 +254,7 @@ func NewMember(key, value string, props ...Property) (Member, error) {
|
||||
if err := m.validate(); err != nil {
|
||||
return newInvalidMember(), err
|
||||
}
|
||||
decodedValue, err := url.QueryUnescape(value)
|
||||
decodedValue, err := url.PathUnescape(value)
|
||||
if err != nil {
|
||||
return newInvalidMember(), fmt.Errorf("%w: %q", errInvalidValue, value)
|
||||
}
|
||||
@@ -301,7 +301,7 @@ func parseMember(member string) (Member, error) {
|
||||
// when converting the header into a data structure."
|
||||
key = strings.TrimSpace(k)
|
||||
var err error
|
||||
value, err = url.QueryUnescape(strings.TrimSpace(v))
|
||||
value, err = url.PathUnescape(strings.TrimSpace(v))
|
||||
if err != nil {
|
||||
return newInvalidMember(), fmt.Errorf("%w: %q", err, value)
|
||||
}
|
||||
|
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"
|
6
vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/exporter.go
generated
vendored
6
vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/exporter.go
generated
vendored
@@ -24,9 +24,7 @@ import (
|
||||
tracesdk "go.opentelemetry.io/otel/sdk/trace"
|
||||
)
|
||||
|
||||
var (
|
||||
errAlreadyStarted = errors.New("already started")
|
||||
)
|
||||
var errAlreadyStarted = errors.New("already started")
|
||||
|
||||
// Exporter exports trace data in the OTLP wire format.
|
||||
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.
|
||||
func (e *Exporter) Start(ctx context.Context) error {
|
||||
var err = errAlreadyStarted
|
||||
err := errAlreadyStarted
|
||||
e.startOnce.Do(func() {
|
||||
e.mu.Lock()
|
||||
e.started = true
|
||||
|
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.
|
||||
func retryable(err error) (bool, time.Duration) {
|
||||
s := status.Convert(err)
|
||||
return retryableGRPCStatus(s)
|
||||
}
|
||||
|
||||
func retryableGRPCStatus(s *status.Status) (bool, time.Duration) {
|
||||
switch s.Code() {
|
||||
case codes.Canceled,
|
||||
codes.DeadlineExceeded,
|
||||
codes.ResourceExhausted,
|
||||
codes.Aborted,
|
||||
codes.OutOfRange,
|
||||
codes.Unavailable,
|
||||
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.
|
||||
return false, 0
|
||||
}
|
||||
|
||||
// throttleDelay returns a duration to wait for if an explicit throttle time
|
||||
// is included in the response status.
|
||||
func throttleDelay(s *status.Status) time.Duration {
|
||||
// throttleDelay returns of the status is RetryInfo
|
||||
// and the its duration to wait for if an explicit throttle time.
|
||||
func throttleDelay(s *status.Status) (bool, time.Duration) {
|
||||
for _, detail := range s.Details() {
|
||||
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.
|
||||
|
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], [WithInsecure], [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)
|
||||
continue
|
||||
}
|
||||
name, err := url.QueryUnescape(n)
|
||||
name, err := url.PathUnescape(n)
|
||||
if err != nil {
|
||||
global.Error(err, "escape header key", "key", n)
|
||||
continue
|
||||
}
|
||||
trimmedName := strings.TrimSpace(name)
|
||||
value, err := url.QueryUnescape(v)
|
||||
value, err := url.PathUnescape(v)
|
||||
if err != nil {
|
||||
global.Error(err, "escape header value", "value", v)
|
||||
continue
|
||||
|
@@ -141,9 +141,6 @@ func NewGRPCConfig(opts ...GRPCOption) Config {
|
||||
if cfg.Traces.Compression == GzipCompression {
|
||||
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 {
|
||||
p := grpc.ConnectParams{
|
||||
Backoff: backoff.DefaultConfig,
|
||||
|
8
vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/options.go
generated
vendored
8
vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/options.go
generated
vendored
@@ -93,13 +93,7 @@ func compressorToCompression(compressor string) otlpconfig.Compression {
|
||||
}
|
||||
|
||||
// WithCompressor sets the compressor for the gRPC client to use when sending
|
||||
// requests. It is the responsibility of the caller to ensure that the
|
||||
// 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.
|
||||
// requests. Supported compressor values: "gzip".
|
||||
func WithCompressor(compressor string) Option {
|
||||
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"
|
||||
"compress/gzip"
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"net"
|
||||
@@ -152,6 +153,10 @@ func (d *client) UploadTraces(ctx context.Context, protoSpans []*tracepb.Resourc
|
||||
|
||||
request.reset(ctx)
|
||||
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 {
|
||||
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 {
|
||||
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
|
||||
if err := proto.Unmarshal(respData.Bytes(), &respProto); err != nil {
|
||||
return err
|
||||
@@ -190,7 +198,10 @@ func (d *client) UploadTraces(ctx context.Context, protoSpans []*tracepb.Resourc
|
||||
}
|
||||
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.
|
||||
if _, err := io.Copy(io.Discard, resp.Body); err != nil {
|
||||
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.
|
||||
|
||||
/*
|
||||
Package otlptracehttp a client that sends traces to the collector using HTTP
|
||||
with binary protobuf payloads.
|
||||
Package otlptracehttp provides an OTLP span exporter using HTTP with 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], [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], [WitnInsecure], [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"
|
||||
|
@@ -174,13 +174,13 @@ func stringToHeader(value string) map[string]string {
|
||||
global.Error(errors.New("missing '="), "parse headers", "input", header)
|
||||
continue
|
||||
}
|
||||
name, err := url.QueryUnescape(n)
|
||||
name, err := url.PathUnescape(n)
|
||||
if err != nil {
|
||||
global.Error(err, "escape header key", "key", n)
|
||||
continue
|
||||
}
|
||||
trimmedName := strings.TrimSpace(name)
|
||||
value, err := url.QueryUnescape(v)
|
||||
value, err := url.PathUnescape(v)
|
||||
if err != nil {
|
||||
global.Error(err, "escape header value", "value", v)
|
||||
continue
|
||||
|
@@ -141,9 +141,6 @@ func NewGRPCConfig(opts ...GRPCOption) Config {
|
||||
if cfg.Traces.Compression == GzipCompression {
|
||||
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 {
|
||||
p := grpc.ConnectParams{
|
||||
Backoff: backoff.DefaultConfig,
|
||||
|
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.
|
||||
func Version() string {
|
||||
return "1.19.0"
|
||||
return "1.21.0"
|
||||
}
|
||||
|
60
vendor/go.opentelemetry.io/otel/internal/global/instruments.go
generated
vendored
60
vendor/go.opentelemetry.io/otel/internal/global/instruments.go
generated
vendored
@@ -34,11 +34,13 @@ type afCounter struct {
|
||||
name string
|
||||
opts []metric.Float64ObservableCounterOption
|
||||
|
||||
delegate atomic.Value //metric.Float64ObservableCounter
|
||||
delegate atomic.Value // metric.Float64ObservableCounter
|
||||
}
|
||||
|
||||
var _ unwrapper = (*afCounter)(nil)
|
||||
var _ metric.Float64ObservableCounter = (*afCounter)(nil)
|
||||
var (
|
||||
_ unwrapper = (*afCounter)(nil)
|
||||
_ metric.Float64ObservableCounter = (*afCounter)(nil)
|
||||
)
|
||||
|
||||
func (i *afCounter) setDelegate(m metric.Meter) {
|
||||
ctr, err := m.Float64ObservableCounter(i.name, i.opts...)
|
||||
@@ -63,11 +65,13 @@ type afUpDownCounter struct {
|
||||
name string
|
||||
opts []metric.Float64ObservableUpDownCounterOption
|
||||
|
||||
delegate atomic.Value //metric.Float64ObservableUpDownCounter
|
||||
delegate atomic.Value // metric.Float64ObservableUpDownCounter
|
||||
}
|
||||
|
||||
var _ unwrapper = (*afUpDownCounter)(nil)
|
||||
var _ metric.Float64ObservableUpDownCounter = (*afUpDownCounter)(nil)
|
||||
var (
|
||||
_ unwrapper = (*afUpDownCounter)(nil)
|
||||
_ metric.Float64ObservableUpDownCounter = (*afUpDownCounter)(nil)
|
||||
)
|
||||
|
||||
func (i *afUpDownCounter) setDelegate(m metric.Meter) {
|
||||
ctr, err := m.Float64ObservableUpDownCounter(i.name, i.opts...)
|
||||
@@ -92,11 +96,13 @@ type afGauge struct {
|
||||
name string
|
||||
opts []metric.Float64ObservableGaugeOption
|
||||
|
||||
delegate atomic.Value //metric.Float64ObservableGauge
|
||||
delegate atomic.Value // metric.Float64ObservableGauge
|
||||
}
|
||||
|
||||
var _ unwrapper = (*afGauge)(nil)
|
||||
var _ metric.Float64ObservableGauge = (*afGauge)(nil)
|
||||
var (
|
||||
_ unwrapper = (*afGauge)(nil)
|
||||
_ metric.Float64ObservableGauge = (*afGauge)(nil)
|
||||
)
|
||||
|
||||
func (i *afGauge) setDelegate(m metric.Meter) {
|
||||
ctr, err := m.Float64ObservableGauge(i.name, i.opts...)
|
||||
@@ -121,11 +127,13 @@ type aiCounter struct {
|
||||
name string
|
||||
opts []metric.Int64ObservableCounterOption
|
||||
|
||||
delegate atomic.Value //metric.Int64ObservableCounter
|
||||
delegate atomic.Value // metric.Int64ObservableCounter
|
||||
}
|
||||
|
||||
var _ unwrapper = (*aiCounter)(nil)
|
||||
var _ metric.Int64ObservableCounter = (*aiCounter)(nil)
|
||||
var (
|
||||
_ unwrapper = (*aiCounter)(nil)
|
||||
_ metric.Int64ObservableCounter = (*aiCounter)(nil)
|
||||
)
|
||||
|
||||
func (i *aiCounter) setDelegate(m metric.Meter) {
|
||||
ctr, err := m.Int64ObservableCounter(i.name, i.opts...)
|
||||
@@ -150,11 +158,13 @@ type aiUpDownCounter struct {
|
||||
name string
|
||||
opts []metric.Int64ObservableUpDownCounterOption
|
||||
|
||||
delegate atomic.Value //metric.Int64ObservableUpDownCounter
|
||||
delegate atomic.Value // metric.Int64ObservableUpDownCounter
|
||||
}
|
||||
|
||||
var _ unwrapper = (*aiUpDownCounter)(nil)
|
||||
var _ metric.Int64ObservableUpDownCounter = (*aiUpDownCounter)(nil)
|
||||
var (
|
||||
_ unwrapper = (*aiUpDownCounter)(nil)
|
||||
_ metric.Int64ObservableUpDownCounter = (*aiUpDownCounter)(nil)
|
||||
)
|
||||
|
||||
func (i *aiUpDownCounter) setDelegate(m metric.Meter) {
|
||||
ctr, err := m.Int64ObservableUpDownCounter(i.name, i.opts...)
|
||||
@@ -179,11 +189,13 @@ type aiGauge struct {
|
||||
name string
|
||||
opts []metric.Int64ObservableGaugeOption
|
||||
|
||||
delegate atomic.Value //metric.Int64ObservableGauge
|
||||
delegate atomic.Value // metric.Int64ObservableGauge
|
||||
}
|
||||
|
||||
var _ unwrapper = (*aiGauge)(nil)
|
||||
var _ metric.Int64ObservableGauge = (*aiGauge)(nil)
|
||||
var (
|
||||
_ unwrapper = (*aiGauge)(nil)
|
||||
_ metric.Int64ObservableGauge = (*aiGauge)(nil)
|
||||
)
|
||||
|
||||
func (i *aiGauge) setDelegate(m metric.Meter) {
|
||||
ctr, err := m.Int64ObservableGauge(i.name, i.opts...)
|
||||
@@ -208,7 +220,7 @@ type sfCounter struct {
|
||||
name string
|
||||
opts []metric.Float64CounterOption
|
||||
|
||||
delegate atomic.Value //metric.Float64Counter
|
||||
delegate atomic.Value // metric.Float64Counter
|
||||
}
|
||||
|
||||
var _ metric.Float64Counter = (*sfCounter)(nil)
|
||||
@@ -234,7 +246,7 @@ type sfUpDownCounter struct {
|
||||
name string
|
||||
opts []metric.Float64UpDownCounterOption
|
||||
|
||||
delegate atomic.Value //metric.Float64UpDownCounter
|
||||
delegate atomic.Value // metric.Float64UpDownCounter
|
||||
}
|
||||
|
||||
var _ metric.Float64UpDownCounter = (*sfUpDownCounter)(nil)
|
||||
@@ -260,7 +272,7 @@ type sfHistogram struct {
|
||||
name string
|
||||
opts []metric.Float64HistogramOption
|
||||
|
||||
delegate atomic.Value //metric.Float64Histogram
|
||||
delegate atomic.Value // metric.Float64Histogram
|
||||
}
|
||||
|
||||
var _ metric.Float64Histogram = (*sfHistogram)(nil)
|
||||
@@ -286,7 +298,7 @@ type siCounter struct {
|
||||
name string
|
||||
opts []metric.Int64CounterOption
|
||||
|
||||
delegate atomic.Value //metric.Int64Counter
|
||||
delegate atomic.Value // metric.Int64Counter
|
||||
}
|
||||
|
||||
var _ metric.Int64Counter = (*siCounter)(nil)
|
||||
@@ -312,7 +324,7 @@ type siUpDownCounter struct {
|
||||
name string
|
||||
opts []metric.Int64UpDownCounterOption
|
||||
|
||||
delegate atomic.Value //metric.Int64UpDownCounter
|
||||
delegate atomic.Value // metric.Int64UpDownCounter
|
||||
}
|
||||
|
||||
var _ metric.Int64UpDownCounter = (*siUpDownCounter)(nil)
|
||||
@@ -338,7 +350,7 @@ type siHistogram struct {
|
||||
name string
|
||||
opts []metric.Int64HistogramOption
|
||||
|
||||
delegate atomic.Value //metric.Int64Histogram
|
||||
delegate atomic.Value // metric.Int64Histogram
|
||||
}
|
||||
|
||||
var _ metric.Int64Histogram = (*siHistogram)(nil)
|
||||
|
7
vendor/go.opentelemetry.io/otel/internal/global/trace.go
generated
vendored
7
vendor/go.opentelemetry.io/otel/internal/global/trace.go
generated
vendored
@@ -39,6 +39,7 @@ import (
|
||||
"go.opentelemetry.io/otel/attribute"
|
||||
"go.opentelemetry.io/otel/codes"
|
||||
"go.opentelemetry.io/otel/trace"
|
||||
"go.opentelemetry.io/otel/trace/embedded"
|
||||
)
|
||||
|
||||
// tracerProvider is a placeholder for a configured SDK TracerProvider.
|
||||
@@ -46,6 +47,8 @@ import (
|
||||
// All TracerProvider functionality is forwarded to a delegate once
|
||||
// configured.
|
||||
type tracerProvider struct {
|
||||
embedded.TracerProvider
|
||||
|
||||
mtx sync.Mutex
|
||||
tracers map[il]*tracer
|
||||
delegate trace.TracerProvider
|
||||
@@ -119,6 +122,8 @@ type il struct {
|
||||
// All Tracer functionality is forwarded to a delegate once configured.
|
||||
// Otherwise, all functionality is forwarded to a NoopTracer.
|
||||
type tracer struct {
|
||||
embedded.Tracer
|
||||
|
||||
name string
|
||||
opts []trace.TracerOption
|
||||
provider *tracerProvider
|
||||
@@ -156,6 +161,8 @@ func (t *tracer) Start(ctx context.Context, name string, opts ...trace.SpanStart
|
||||
// SpanContext. It performs no operations other than to return the wrapped
|
||||
// SpanContext.
|
||||
type nonRecordingSpan struct {
|
||||
embedded.Span
|
||||
|
||||
sc trace.SpanContext
|
||||
tracer *tracer
|
||||
}
|
||||
|
2
vendor/go.opentelemetry.io/otel/metric/doc.go
generated
vendored
2
vendor/go.opentelemetry.io/otel/metric/doc.go
generated
vendored
@@ -149,7 +149,7 @@ of [go.opentelemetry.io/otel/metric].
|
||||
|
||||
Finally, an author can embed another implementation in theirs. The embedded
|
||||
implementation will be used for methods not defined by the author. For example,
|
||||
an author who want to default to silently dropping the call can use
|
||||
an author who wants to default to silently dropping the call can use
|
||||
[go.opentelemetry.io/otel/metric/noop]:
|
||||
|
||||
import "go.opentelemetry.io/otel/metric/noop"
|
||||
|
23
vendor/go.opentelemetry.io/otel/metric/instrument.go
generated
vendored
23
vendor/go.opentelemetry.io/otel/metric/instrument.go
generated
vendored
@@ -39,6 +39,12 @@ type InstrumentOption interface {
|
||||
Float64ObservableGaugeOption
|
||||
}
|
||||
|
||||
// HistogramOption applies options to histogram instruments.
|
||||
type HistogramOption interface {
|
||||
Int64HistogramOption
|
||||
Float64HistogramOption
|
||||
}
|
||||
|
||||
type descOpt string
|
||||
|
||||
func (o descOpt) applyFloat64Counter(c Float64CounterConfig) Float64CounterConfig {
|
||||
@@ -171,6 +177,23 @@ func (o unitOpt) applyInt64ObservableGauge(c Int64ObservableGaugeConfig) Int64Ob
|
||||
// The unit u should be defined using the appropriate [UCUM](https://ucum.org) case-sensitive code.
|
||||
func WithUnit(u string) InstrumentOption { return unitOpt(u) }
|
||||
|
||||
// WithExplicitBucketBoundaries sets the instrument explicit bucket boundaries.
|
||||
//
|
||||
// This option is considered "advisory", and may be ignored by API implementations.
|
||||
func WithExplicitBucketBoundaries(bounds ...float64) HistogramOption { return bucketOpt(bounds) }
|
||||
|
||||
type bucketOpt []float64
|
||||
|
||||
func (o bucketOpt) applyFloat64Histogram(c Float64HistogramConfig) Float64HistogramConfig {
|
||||
c.explicitBucketBoundaries = o
|
||||
return c
|
||||
}
|
||||
|
||||
func (o bucketOpt) applyInt64Histogram(c Int64HistogramConfig) Int64HistogramConfig {
|
||||
c.explicitBucketBoundaries = o
|
||||
return c
|
||||
}
|
||||
|
||||
// AddOption applies options to an addition measurement. See
|
||||
// [MeasurementOption] for other options that can be used as an AddOption.
|
||||
type AddOption interface {
|
||||
|
10
vendor/go.opentelemetry.io/otel/metric/syncfloat64.go
generated
vendored
10
vendor/go.opentelemetry.io/otel/metric/syncfloat64.go
generated
vendored
@@ -147,8 +147,9 @@ type Float64Histogram interface {
|
||||
// Float64HistogramConfig contains options for synchronous counter instruments
|
||||
// that record int64 values.
|
||||
type Float64HistogramConfig struct {
|
||||
description string
|
||||
unit string
|
||||
description string
|
||||
unit string
|
||||
explicitBucketBoundaries []float64
|
||||
}
|
||||
|
||||
// NewFloat64HistogramConfig returns a new [Float64HistogramConfig] with all
|
||||
@@ -171,6 +172,11 @@ func (c Float64HistogramConfig) Unit() string {
|
||||
return c.unit
|
||||
}
|
||||
|
||||
// ExplicitBucketBoundaries returns the configured explicit bucket boundaries.
|
||||
func (c Float64HistogramConfig) ExplicitBucketBoundaries() []float64 {
|
||||
return c.explicitBucketBoundaries
|
||||
}
|
||||
|
||||
// Float64HistogramOption applies options to a [Float64HistogramConfig]. See
|
||||
// [InstrumentOption] for other options that can be used as a
|
||||
// Float64HistogramOption.
|
||||
|
10
vendor/go.opentelemetry.io/otel/metric/syncint64.go
generated
vendored
10
vendor/go.opentelemetry.io/otel/metric/syncint64.go
generated
vendored
@@ -147,8 +147,9 @@ type Int64Histogram interface {
|
||||
// Int64HistogramConfig contains options for synchronous counter instruments
|
||||
// that record int64 values.
|
||||
type Int64HistogramConfig struct {
|
||||
description string
|
||||
unit string
|
||||
description string
|
||||
unit string
|
||||
explicitBucketBoundaries []float64
|
||||
}
|
||||
|
||||
// NewInt64HistogramConfig returns a new [Int64HistogramConfig] with all opts
|
||||
@@ -171,6 +172,11 @@ func (c Int64HistogramConfig) Unit() string {
|
||||
return c.unit
|
||||
}
|
||||
|
||||
// ExplicitBucketBoundaries returns the configured explicit bucket boundaries.
|
||||
func (c Int64HistogramConfig) ExplicitBucketBoundaries() []float64 {
|
||||
return c.explicitBucketBoundaries
|
||||
}
|
||||
|
||||
// Int64HistogramOption applies options to a [Int64HistogramConfig]. See
|
||||
// [InstrumentOption] for other options that can be used as an
|
||||
// Int64HistogramOption.
|
||||
|
6
vendor/go.opentelemetry.io/otel/propagation/trace_context.go
generated
vendored
6
vendor/go.opentelemetry.io/otel/propagation/trace_context.go
generated
vendored
@@ -40,8 +40,10 @@ const (
|
||||
// their proprietary information.
|
||||
type TraceContext struct{}
|
||||
|
||||
var _ TextMapPropagator = TraceContext{}
|
||||
var 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})(?:-.*)?$")
|
||||
var (
|
||||
_ 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})(?:-.*)?$")
|
||||
)
|
||||
|
||||
// Inject set tracecontext from the Context into the carrier.
|
||||
func (tc TraceContext) Inject(ctx context.Context, carrier TextMapCarrier) {
|
||||
|
2
vendor/go.opentelemetry.io/otel/requirements.txt
generated
vendored
2
vendor/go.opentelemetry.io/otel/requirements.txt
generated
vendored
@@ -1 +1 @@
|
||||
codespell==2.2.5
|
||||
codespell==2.2.6
|
||||
|
32
vendor/go.opentelemetry.io/otel/sdk/metric/instrument.go
generated
vendored
32
vendor/go.opentelemetry.io/otel/sdk/metric/instrument.go
generated
vendored
@@ -188,9 +188,11 @@ type int64Inst struct {
|
||||
embedded.Int64Histogram
|
||||
}
|
||||
|
||||
var _ metric.Int64Counter = (*int64Inst)(nil)
|
||||
var _ metric.Int64UpDownCounter = (*int64Inst)(nil)
|
||||
var _ metric.Int64Histogram = (*int64Inst)(nil)
|
||||
var (
|
||||
_ metric.Int64Counter = (*int64Inst)(nil)
|
||||
_ metric.Int64UpDownCounter = (*int64Inst)(nil)
|
||||
_ metric.Int64Histogram = (*int64Inst)(nil)
|
||||
)
|
||||
|
||||
func (i *int64Inst) Add(ctx context.Context, val int64, opts ...metric.AddOption) {
|
||||
c := metric.NewAddConfig(opts)
|
||||
@@ -219,9 +221,11 @@ type float64Inst struct {
|
||||
embedded.Float64Histogram
|
||||
}
|
||||
|
||||
var _ metric.Float64Counter = (*float64Inst)(nil)
|
||||
var _ metric.Float64UpDownCounter = (*float64Inst)(nil)
|
||||
var _ metric.Float64Histogram = (*float64Inst)(nil)
|
||||
var (
|
||||
_ metric.Float64Counter = (*float64Inst)(nil)
|
||||
_ metric.Float64UpDownCounter = (*float64Inst)(nil)
|
||||
_ metric.Float64Histogram = (*float64Inst)(nil)
|
||||
)
|
||||
|
||||
func (i *float64Inst) Add(ctx context.Context, val float64, opts ...metric.AddOption) {
|
||||
c := metric.NewAddConfig(opts)
|
||||
@@ -260,9 +264,11 @@ type float64Observable struct {
|
||||
embedded.Float64ObservableGauge
|
||||
}
|
||||
|
||||
var _ metric.Float64ObservableCounter = float64Observable{}
|
||||
var _ metric.Float64ObservableUpDownCounter = float64Observable{}
|
||||
var _ metric.Float64ObservableGauge = float64Observable{}
|
||||
var (
|
||||
_ metric.Float64ObservableCounter = float64Observable{}
|
||||
_ metric.Float64ObservableUpDownCounter = float64Observable{}
|
||||
_ metric.Float64ObservableGauge = float64Observable{}
|
||||
)
|
||||
|
||||
func newFloat64Observable(m *meter, kind InstrumentKind, name, desc, u string, meas []aggregate.Measure[float64]) float64Observable {
|
||||
return float64Observable{
|
||||
@@ -279,9 +285,11 @@ type int64Observable struct {
|
||||
embedded.Int64ObservableGauge
|
||||
}
|
||||
|
||||
var _ metric.Int64ObservableCounter = int64Observable{}
|
||||
var _ metric.Int64ObservableUpDownCounter = int64Observable{}
|
||||
var _ metric.Int64ObservableGauge = int64Observable{}
|
||||
var (
|
||||
_ metric.Int64ObservableCounter = int64Observable{}
|
||||
_ metric.Int64ObservableUpDownCounter = int64Observable{}
|
||||
_ metric.Int64ObservableGauge = int64Observable{}
|
||||
)
|
||||
|
||||
func newInt64Observable(m *meter, kind InstrumentKind, name, desc, u string, meas []aggregate.Measure[int64]) int64Observable {
|
||||
return int64Observable{
|
||||
|
@@ -113,7 +113,7 @@ func (p *expoHistogramDataPoint[N]) record(v N) {
|
||||
otel.Handle(errors.New("exponential histogram scale underflow"))
|
||||
return
|
||||
}
|
||||
//Downscale
|
||||
// Downscale
|
||||
p.scale -= scaleDelta
|
||||
p.posBuckets.downscale(scaleDelta)
|
||||
p.negBuckets.downscale(scaleDelta)
|
||||
|
64
vendor/go.opentelemetry.io/otel/sdk/metric/meter.go
generated
vendored
64
vendor/go.opentelemetry.io/otel/sdk/metric/meter.go
generated
vendored
@@ -26,11 +26,9 @@ import (
|
||||
"go.opentelemetry.io/otel/sdk/metric/internal/aggregate"
|
||||
)
|
||||
|
||||
var (
|
||||
// ErrInstrumentName indicates the created instrument has an invalid name.
|
||||
// Valid names must consist of 255 or fewer characters including alphanumeric, _, ., -, / and start with a letter.
|
||||
ErrInstrumentName = errors.New("invalid instrument name")
|
||||
)
|
||||
// ErrInstrumentName indicates the created instrument has an invalid name.
|
||||
// Valid names must consist of 255 or fewer characters including alphanumeric, _, ., -, / and start with a letter.
|
||||
var ErrInstrumentName = errors.New("invalid instrument name")
|
||||
|
||||
// meter handles the creation and coordination of all metric instruments. A
|
||||
// meter represents a single instrumentation scope; all metric telemetry
|
||||
@@ -97,9 +95,8 @@ func (m *meter) Int64UpDownCounter(name string, options ...metric.Int64UpDownCou
|
||||
// distribution of int64 measurements during a computational operation.
|
||||
func (m *meter) Int64Histogram(name string, options ...metric.Int64HistogramOption) (metric.Int64Histogram, error) {
|
||||
cfg := metric.NewInt64HistogramConfig(options...)
|
||||
const kind = InstrumentKindHistogram
|
||||
p := int64InstProvider{m}
|
||||
i, err := p.lookup(kind, name, cfg.Description(), cfg.Unit())
|
||||
i, err := p.lookupHistogram(name, cfg)
|
||||
if err != nil {
|
||||
return i, err
|
||||
}
|
||||
@@ -190,9 +187,8 @@ func (m *meter) Float64UpDownCounter(name string, options ...metric.Float64UpDow
|
||||
// distribution of float64 measurements during a computational operation.
|
||||
func (m *meter) Float64Histogram(name string, options ...metric.Float64HistogramOption) (metric.Float64Histogram, error) {
|
||||
cfg := metric.NewFloat64HistogramConfig(options...)
|
||||
const kind = InstrumentKindHistogram
|
||||
p := float64InstProvider{m}
|
||||
i, err := p.lookup(kind, name, cfg.Description(), cfg.Unit())
|
||||
i, err := p.lookupHistogram(name, cfg)
|
||||
if err != nil {
|
||||
return i, err
|
||||
}
|
||||
@@ -268,9 +264,11 @@ func validateInstrumentName(name string) error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func isAlpha(c rune) bool {
|
||||
return ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z')
|
||||
}
|
||||
|
||||
func isAlphanumeric(c rune) bool {
|
||||
return isAlpha(c) || ('0' <= c && c <= '9')
|
||||
}
|
||||
@@ -456,12 +454,36 @@ func (p int64InstProvider) aggs(kind InstrumentKind, name, desc, u string) ([]ag
|
||||
return p.int64Resolver.Aggregators(inst)
|
||||
}
|
||||
|
||||
func (p int64InstProvider) histogramAggs(name string, cfg metric.Int64HistogramConfig) ([]aggregate.Measure[int64], error) {
|
||||
boundaries := cfg.ExplicitBucketBoundaries()
|
||||
aggError := AggregationExplicitBucketHistogram{Boundaries: boundaries}.err()
|
||||
if aggError != nil {
|
||||
// If boundaries are invalid, ignore them.
|
||||
boundaries = nil
|
||||
}
|
||||
inst := Instrument{
|
||||
Name: name,
|
||||
Description: cfg.Description(),
|
||||
Unit: cfg.Unit(),
|
||||
Kind: InstrumentKindHistogram,
|
||||
Scope: p.scope,
|
||||
}
|
||||
measures, err := p.int64Resolver.HistogramAggregators(inst, boundaries)
|
||||
return measures, errors.Join(aggError, err)
|
||||
}
|
||||
|
||||
// lookup returns the resolved instrumentImpl.
|
||||
func (p int64InstProvider) lookup(kind InstrumentKind, name, desc, u string) (*int64Inst, error) {
|
||||
aggs, err := p.aggs(kind, name, desc, u)
|
||||
return &int64Inst{measures: aggs}, err
|
||||
}
|
||||
|
||||
// lookupHistogram returns the resolved instrumentImpl.
|
||||
func (p int64InstProvider) lookupHistogram(name string, cfg metric.Int64HistogramConfig) (*int64Inst, error) {
|
||||
aggs, err := p.histogramAggs(name, cfg)
|
||||
return &int64Inst{measures: aggs}, err
|
||||
}
|
||||
|
||||
// float64InstProvider provides float64 OpenTelemetry instruments.
|
||||
type float64InstProvider struct{ *meter }
|
||||
|
||||
@@ -476,12 +498,36 @@ func (p float64InstProvider) aggs(kind InstrumentKind, name, desc, u string) ([]
|
||||
return p.float64Resolver.Aggregators(inst)
|
||||
}
|
||||
|
||||
func (p float64InstProvider) histogramAggs(name string, cfg metric.Float64HistogramConfig) ([]aggregate.Measure[float64], error) {
|
||||
boundaries := cfg.ExplicitBucketBoundaries()
|
||||
aggError := AggregationExplicitBucketHistogram{Boundaries: boundaries}.err()
|
||||
if aggError != nil {
|
||||
// If boundaries are invalid, ignore them.
|
||||
boundaries = nil
|
||||
}
|
||||
inst := Instrument{
|
||||
Name: name,
|
||||
Description: cfg.Description(),
|
||||
Unit: cfg.Unit(),
|
||||
Kind: InstrumentKindHistogram,
|
||||
Scope: p.scope,
|
||||
}
|
||||
measures, err := p.float64Resolver.HistogramAggregators(inst, boundaries)
|
||||
return measures, errors.Join(aggError, err)
|
||||
}
|
||||
|
||||
// lookup returns the resolved instrumentImpl.
|
||||
func (p float64InstProvider) lookup(kind InstrumentKind, name, desc, u string) (*float64Inst, error) {
|
||||
aggs, err := p.aggs(kind, name, desc, u)
|
||||
return &float64Inst{measures: aggs}, err
|
||||
}
|
||||
|
||||
// lookupHistogram returns the resolved instrumentImpl.
|
||||
func (p float64InstProvider) lookupHistogram(name string, cfg metric.Float64HistogramConfig) (*float64Inst, error) {
|
||||
aggs, err := p.histogramAggs(name, cfg)
|
||||
return &float64Inst{measures: aggs}, err
|
||||
}
|
||||
|
||||
type int64ObservProvider struct{ *meter }
|
||||
|
||||
func (p int64ObservProvider) lookup(kind InstrumentKind, name, desc, u string) (int64Observable, error) {
|
||||
|
51
vendor/go.opentelemetry.io/otel/sdk/metric/metricdata/data.go
generated
vendored
51
vendor/go.opentelemetry.io/otel/sdk/metric/metricdata/data.go
generated
vendored
@@ -240,3 +240,54 @@ type Exemplar[N int64 | float64] struct {
|
||||
// be empty.
|
||||
TraceID []byte `json:",omitempty"`
|
||||
}
|
||||
|
||||
// Summary metric data are used to convey quantile summaries,
|
||||
// a Prometheus (see: https://prometheus.io/docs/concepts/metric_types/#summary)
|
||||
// data type.
|
||||
//
|
||||
// These data points cannot always be merged in a meaningful way. The Summary
|
||||
// type is only used by bridges from other metrics libraries, and cannot be
|
||||
// produced using OpenTelemetry instrumentation.
|
||||
type Summary struct {
|
||||
// DataPoints are the individual aggregated measurements with unique
|
||||
// attributes.
|
||||
DataPoints []SummaryDataPoint
|
||||
}
|
||||
|
||||
func (Summary) privateAggregation() {}
|
||||
|
||||
// SummaryDataPoint is a single data point in a timeseries that describes the
|
||||
// time-varying values of a Summary metric.
|
||||
type SummaryDataPoint struct {
|
||||
// Attributes is the set of key value pairs that uniquely identify the
|
||||
// timeseries.
|
||||
Attributes attribute.Set
|
||||
|
||||
// StartTime is when the timeseries was started.
|
||||
StartTime time.Time
|
||||
// Time is the time when the timeseries was recorded.
|
||||
Time time.Time
|
||||
|
||||
// Count is the number of updates this summary has been calculated with.
|
||||
Count uint64
|
||||
|
||||
// Sum is the sum of the values recorded.
|
||||
Sum float64
|
||||
|
||||
// (Optional) list of values at different quantiles of the distribution calculated
|
||||
// from the current snapshot. The quantiles must be strictly increasing.
|
||||
QuantileValues []QuantileValue
|
||||
}
|
||||
|
||||
// QuantileValue is the value at a given quantile of a summary.
|
||||
type QuantileValue struct {
|
||||
// Quantile is the quantile of this value.
|
||||
//
|
||||
// Must be in the interval [0.0, 1.0].
|
||||
Quantile float64
|
||||
|
||||
// Value is the value at the given quantile of a summary.
|
||||
//
|
||||
// Quantile values must NOT be negative.
|
||||
Value float64
|
||||
}
|
||||
|
3
vendor/go.opentelemetry.io/otel/sdk/metric/periodic_reader.go
generated
vendored
3
vendor/go.opentelemetry.io/otel/sdk/metric/periodic_reader.go
generated
vendored
@@ -127,7 +127,8 @@ func NewPeriodicReader(exporter Exporter, options ...PeriodicReaderOption) *Peri
|
||||
rmPool: sync.Pool{
|
||||
New: func() interface{} {
|
||||
return &metricdata.ResourceMetrics{}
|
||||
}},
|
||||
},
|
||||
},
|
||||
}
|
||||
r.externalProducers.Store(conf.producers)
|
||||
|
||||
|
81
vendor/go.opentelemetry.io/otel/sdk/metric/pipeline.go
generated
vendored
81
vendor/go.opentelemetry.io/otel/sdk/metric/pipeline.go
generated
vendored
@@ -231,7 +231,7 @@ func newInserter[N int64 | float64](p *pipeline, vc *cache[string, instID]) *ins
|
||||
//
|
||||
// If an instrument is determined to use a Drop aggregation, that instrument is
|
||||
// not inserted nor returned.
|
||||
func (i *inserter[N]) Instrument(inst Instrument) ([]aggregate.Measure[N], error) {
|
||||
func (i *inserter[N]) Instrument(inst Instrument, readerAggregation Aggregation) ([]aggregate.Measure[N], error) {
|
||||
var (
|
||||
matched bool
|
||||
measures []aggregate.Measure[N]
|
||||
@@ -245,8 +245,7 @@ func (i *inserter[N]) Instrument(inst Instrument) ([]aggregate.Measure[N], error
|
||||
continue
|
||||
}
|
||||
matched = true
|
||||
|
||||
in, id, err := i.cachedAggregator(inst.Scope, inst.Kind, stream)
|
||||
in, id, err := i.cachedAggregator(inst.Scope, inst.Kind, stream, readerAggregation)
|
||||
if err != nil {
|
||||
errs.append(err)
|
||||
}
|
||||
@@ -271,7 +270,7 @@ func (i *inserter[N]) Instrument(inst Instrument) ([]aggregate.Measure[N], error
|
||||
Description: inst.Description,
|
||||
Unit: inst.Unit,
|
||||
}
|
||||
in, _, err := i.cachedAggregator(inst.Scope, inst.Kind, stream)
|
||||
in, _, err := i.cachedAggregator(inst.Scope, inst.Kind, stream, readerAggregation)
|
||||
if err != nil {
|
||||
errs.append(err)
|
||||
}
|
||||
@@ -291,6 +290,31 @@ type aggVal[N int64 | float64] struct {
|
||||
Err error
|
||||
}
|
||||
|
||||
// readerDefaultAggregation returns the default aggregation for the instrument
|
||||
// kind based on the reader's aggregation preferences. This is used unless the
|
||||
// aggregation is overridden with a view.
|
||||
func (i *inserter[N]) readerDefaultAggregation(kind InstrumentKind) Aggregation {
|
||||
aggregation := i.pipeline.reader.aggregation(kind)
|
||||
switch aggregation.(type) {
|
||||
case nil, AggregationDefault:
|
||||
// If the reader returns default or nil use the default selector.
|
||||
aggregation = DefaultAggregationSelector(kind)
|
||||
default:
|
||||
// Deep copy and validate before using.
|
||||
aggregation = aggregation.copy()
|
||||
if err := aggregation.err(); err != nil {
|
||||
orig := aggregation
|
||||
aggregation = DefaultAggregationSelector(kind)
|
||||
global.Error(
|
||||
err, "using default aggregation instead",
|
||||
"aggregation", orig,
|
||||
"replacement", aggregation,
|
||||
)
|
||||
}
|
||||
}
|
||||
return aggregation
|
||||
}
|
||||
|
||||
// cachedAggregator returns the appropriate aggregate input and output
|
||||
// functions for an instrument configuration. If the exact instrument has been
|
||||
// created within the inst.Scope, those aggregate function instances will be
|
||||
@@ -305,29 +329,14 @@ type aggVal[N int64 | float64] struct {
|
||||
//
|
||||
// If the instrument defines an unknown or incompatible aggregation, an error
|
||||
// is returned.
|
||||
func (i *inserter[N]) cachedAggregator(scope instrumentation.Scope, kind InstrumentKind, stream Stream) (meas aggregate.Measure[N], aggID uint64, err error) {
|
||||
func (i *inserter[N]) cachedAggregator(scope instrumentation.Scope, kind InstrumentKind, stream Stream, readerAggregation Aggregation) (meas aggregate.Measure[N], aggID uint64, err error) {
|
||||
switch stream.Aggregation.(type) {
|
||||
case nil:
|
||||
// Undefined, nil, means to use the default from the reader.
|
||||
stream.Aggregation = i.pipeline.reader.aggregation(kind)
|
||||
switch stream.Aggregation.(type) {
|
||||
case nil, AggregationDefault:
|
||||
// If the reader returns default or nil use the default selector.
|
||||
stream.Aggregation = DefaultAggregationSelector(kind)
|
||||
default:
|
||||
// Deep copy and validate before using.
|
||||
stream.Aggregation = stream.Aggregation.copy()
|
||||
if err := stream.Aggregation.err(); err != nil {
|
||||
orig := stream.Aggregation
|
||||
stream.Aggregation = DefaultAggregationSelector(kind)
|
||||
global.Error(
|
||||
err, "using default aggregation instead",
|
||||
"aggregation", orig,
|
||||
"replacement", stream.Aggregation,
|
||||
)
|
||||
}
|
||||
}
|
||||
// The aggregation was not overridden with a view. Use the aggregation
|
||||
// provided by the reader.
|
||||
stream.Aggregation = readerAggregation
|
||||
case AggregationDefault:
|
||||
// The view explicitly requested the default aggregation.
|
||||
stream.Aggregation = DefaultAggregationSelector(kind)
|
||||
}
|
||||
|
||||
@@ -596,7 +605,29 @@ func (r resolver[N]) Aggregators(id Instrument) ([]aggregate.Measure[N], error)
|
||||
|
||||
errs := &multierror{}
|
||||
for _, i := range r.inserters {
|
||||
in, err := i.Instrument(id)
|
||||
in, err := i.Instrument(id, i.readerDefaultAggregation(id.Kind))
|
||||
if err != nil {
|
||||
errs.append(err)
|
||||
}
|
||||
measures = append(measures, in...)
|
||||
}
|
||||
return measures, errs.errorOrNil()
|
||||
}
|
||||
|
||||
// HistogramAggregators returns the histogram Aggregators that must be updated by the instrument
|
||||
// defined by key. If boundaries were provided on instrument instantiation, those take precedence
|
||||
// over boundaries provided by the reader.
|
||||
func (r resolver[N]) HistogramAggregators(id Instrument, boundaries []float64) ([]aggregate.Measure[N], error) {
|
||||
var measures []aggregate.Measure[N]
|
||||
|
||||
errs := &multierror{}
|
||||
for _, i := range r.inserters {
|
||||
agg := i.readerDefaultAggregation(id.Kind)
|
||||
if histAgg, ok := agg.(AggregationExplicitBucketHistogram); ok && len(boundaries) > 0 {
|
||||
histAgg.Boundaries = boundaries
|
||||
agg = histAgg
|
||||
}
|
||||
in, err := i.Instrument(id, agg)
|
||||
if err != nil {
|
||||
errs.append(err)
|
||||
}
|
||||
|
2
vendor/go.opentelemetry.io/otel/sdk/metric/version.go
generated
vendored
2
vendor/go.opentelemetry.io/otel/sdk/metric/version.go
generated
vendored
@@ -16,5 +16,5 @@ package metric // import "go.opentelemetry.io/otel/sdk/metric"
|
||||
|
||||
// version is the current release version of the metric SDK in use.
|
||||
func version() string {
|
||||
return "1.19.0"
|
||||
return "1.21.0"
|
||||
}
|
||||
|
10
vendor/go.opentelemetry.io/otel/sdk/resource/auto.go
generated
vendored
10
vendor/go.opentelemetry.io/otel/sdk/resource/auto.go
generated
vendored
@@ -21,12 +21,10 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
var (
|
||||
// ErrPartialResource is returned by a detector when complete source
|
||||
// information for a Resource is unavailable or the source information
|
||||
// contains invalid values that are omitted from the returned Resource.
|
||||
ErrPartialResource = errors.New("partial resource")
|
||||
)
|
||||
// ErrPartialResource is returned by a detector when complete source
|
||||
// information for a Resource is unavailable or the source information
|
||||
// contains invalid values that are omitted from the returned Resource.
|
||||
var ErrPartialResource = errors.New("partial resource")
|
||||
|
||||
// Detector detects OpenTelemetry resource information.
|
||||
type Detector interface {
|
||||
|
10
vendor/go.opentelemetry.io/otel/sdk/resource/env.go
generated
vendored
10
vendor/go.opentelemetry.io/otel/sdk/resource/env.go
generated
vendored
@@ -28,16 +28,14 @@ import (
|
||||
|
||||
const (
|
||||
// resourceAttrKey is the environment variable name OpenTelemetry Resource information will be read from.
|
||||
resourceAttrKey = "OTEL_RESOURCE_ATTRIBUTES"
|
||||
resourceAttrKey = "OTEL_RESOURCE_ATTRIBUTES" //nolint:gosec // False positive G101: Potential hardcoded credentials
|
||||
|
||||
// svcNameKey is the environment variable name that Service Name information will be read from.
|
||||
svcNameKey = "OTEL_SERVICE_NAME"
|
||||
)
|
||||
|
||||
var (
|
||||
// errMissingValue is returned when a resource value is missing.
|
||||
errMissingValue = fmt.Errorf("%w: missing value", ErrPartialResource)
|
||||
)
|
||||
// errMissingValue is returned when a resource value is missing.
|
||||
var errMissingValue = fmt.Errorf("%w: missing value", ErrPartialResource)
|
||||
|
||||
// fromEnv is a Detector that implements the Detector and collects
|
||||
// resources from environment. This Detector is included as a
|
||||
@@ -91,7 +89,7 @@ func constructOTResources(s string) (*Resource, error) {
|
||||
continue
|
||||
}
|
||||
key := strings.TrimSpace(k)
|
||||
val, err := url.QueryUnescape(strings.TrimSpace(v))
|
||||
val, err := url.PathUnescape(strings.TrimSpace(v))
|
||||
if err != nil {
|
||||
// Retain original value if decoding fails, otherwise it will be
|
||||
// an empty string.
|
||||
|
7
vendor/go.opentelemetry.io/otel/sdk/resource/os.go
generated
vendored
7
vendor/go.opentelemetry.io/otel/sdk/resource/os.go
generated
vendored
@@ -36,8 +36,10 @@ func setOSDescriptionProvider(osDescriptionProvider osDescriptionProvider) {
|
||||
osDescription = osDescriptionProvider
|
||||
}
|
||||
|
||||
type osTypeDetector struct{}
|
||||
type osDescriptionDetector struct{}
|
||||
type (
|
||||
osTypeDetector struct{}
|
||||
osDescriptionDetector struct{}
|
||||
)
|
||||
|
||||
// Detect returns a *Resource that describes the operating system type the
|
||||
// service is running on.
|
||||
@@ -56,7 +58,6 @@ func (osTypeDetector) Detect(ctx context.Context) (*Resource, error) {
|
||||
// service is running on.
|
||||
func (osDescriptionDetector) Detect(ctx context.Context) (*Resource, error) {
|
||||
description, err := osDescription()
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
36
vendor/go.opentelemetry.io/otel/sdk/resource/process.go
generated
vendored
36
vendor/go.opentelemetry.io/otel/sdk/resource/process.go
generated
vendored
@@ -25,14 +25,16 @@ import (
|
||||
semconv "go.opentelemetry.io/otel/semconv/v1.21.0"
|
||||
)
|
||||
|
||||
type pidProvider func() int
|
||||
type executablePathProvider func() (string, error)
|
||||
type commandArgsProvider func() []string
|
||||
type ownerProvider func() (*user.User, error)
|
||||
type runtimeNameProvider func() string
|
||||
type runtimeVersionProvider func() string
|
||||
type runtimeOSProvider func() string
|
||||
type runtimeArchProvider func() string
|
||||
type (
|
||||
pidProvider func() int
|
||||
executablePathProvider func() (string, error)
|
||||
commandArgsProvider func() []string
|
||||
ownerProvider func() (*user.User, error)
|
||||
runtimeNameProvider func() string
|
||||
runtimeVersionProvider func() string
|
||||
runtimeOSProvider func() string
|
||||
runtimeArchProvider func() string
|
||||
)
|
||||
|
||||
var (
|
||||
defaultPidProvider pidProvider = os.Getpid
|
||||
@@ -108,14 +110,16 @@ func setUserProviders(ownerProvider ownerProvider) {
|
||||
owner = ownerProvider
|
||||
}
|
||||
|
||||
type processPIDDetector struct{}
|
||||
type processExecutableNameDetector struct{}
|
||||
type processExecutablePathDetector struct{}
|
||||
type processCommandArgsDetector struct{}
|
||||
type processOwnerDetector struct{}
|
||||
type processRuntimeNameDetector struct{}
|
||||
type processRuntimeVersionDetector struct{}
|
||||
type processRuntimeDescriptionDetector struct{}
|
||||
type (
|
||||
processPIDDetector struct{}
|
||||
processExecutableNameDetector struct{}
|
||||
processExecutablePathDetector struct{}
|
||||
processCommandArgsDetector struct{}
|
||||
processOwnerDetector struct{}
|
||||
processRuntimeNameDetector struct{}
|
||||
processRuntimeVersionDetector struct{}
|
||||
processRuntimeDescriptionDetector struct{}
|
||||
)
|
||||
|
||||
// Detect returns a *Resource that describes the process identifier (PID) of the
|
||||
// executing process.
|
||||
|
8
vendor/go.opentelemetry.io/otel/sdk/trace/provider.go
generated
vendored
8
vendor/go.opentelemetry.io/otel/sdk/trace/provider.go
generated
vendored
@@ -25,6 +25,8 @@ import (
|
||||
"go.opentelemetry.io/otel/sdk/instrumentation"
|
||||
"go.opentelemetry.io/otel/sdk/resource"
|
||||
"go.opentelemetry.io/otel/trace"
|
||||
"go.opentelemetry.io/otel/trace/embedded"
|
||||
"go.opentelemetry.io/otel/trace/noop"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -73,6 +75,8 @@ func (cfg tracerProviderConfig) MarshalLog() interface{} {
|
||||
// TracerProvider is an OpenTelemetry TracerProvider. It provides Tracers to
|
||||
// instrumentation so it can trace operational flow through a system.
|
||||
type TracerProvider struct {
|
||||
embedded.TracerProvider
|
||||
|
||||
mu sync.Mutex
|
||||
namedTracer map[instrumentation.Scope]*tracer
|
||||
spanProcessors atomic.Pointer[spanProcessorStates]
|
||||
@@ -139,7 +143,7 @@ func NewTracerProvider(opts ...TracerProviderOption) *TracerProvider {
|
||||
func (p *TracerProvider) Tracer(name string, opts ...trace.TracerOption) trace.Tracer {
|
||||
// This check happens before the mutex is acquired to avoid deadlocking if Tracer() is called from within Shutdown().
|
||||
if p.isShutdown.Load() {
|
||||
return trace.NewNoopTracerProvider().Tracer(name, opts...)
|
||||
return noop.NewTracerProvider().Tracer(name, opts...)
|
||||
}
|
||||
c := trace.NewTracerConfig(opts...)
|
||||
if name == "" {
|
||||
@@ -157,7 +161,7 @@ func (p *TracerProvider) Tracer(name string, opts ...trace.TracerOption) trace.T
|
||||
// Must check the flag after acquiring the mutex to avoid returning a valid tracer if Shutdown() ran
|
||||
// after the first check above but before we acquired the mutex.
|
||||
if p.isShutdown.Load() {
|
||||
return trace.NewNoopTracerProvider().Tracer(name, opts...), true
|
||||
return noop.NewTracerProvider().Tracer(name, opts...), true
|
||||
}
|
||||
t, ok := p.namedTracer[is]
|
||||
if !ok {
|
||||
|
4
vendor/go.opentelemetry.io/otel/sdk/trace/sampling.go
generated
vendored
4
vendor/go.opentelemetry.io/otel/sdk/trace/sampling.go
generated
vendored
@@ -158,9 +158,9 @@ func NeverSample() Sampler {
|
||||
return alwaysOffSampler{}
|
||||
}
|
||||
|
||||
// ParentBased returns a composite sampler which behaves differently,
|
||||
// ParentBased returns a sampler decorator which behaves differently,
|
||||
// based on the parent of the span. If the span has no parent,
|
||||
// the root(Sampler) is used to make sampling decision. If the span has
|
||||
// the decorated sampler is used to make sampling decision. If the span has
|
||||
// a parent, depending on whether the parent is remote and whether it
|
||||
// is sampled, one of the following samplers will apply:
|
||||
// - remoteParentSampled(Sampler) (default: AlwaysOn)
|
||||
|
11
vendor/go.opentelemetry.io/otel/sdk/trace/span.go
generated
vendored
11
vendor/go.opentelemetry.io/otel/sdk/trace/span.go
generated
vendored
@@ -32,6 +32,7 @@ import (
|
||||
"go.opentelemetry.io/otel/sdk/resource"
|
||||
semconv "go.opentelemetry.io/otel/semconv/v1.21.0"
|
||||
"go.opentelemetry.io/otel/trace"
|
||||
"go.opentelemetry.io/otel/trace/embedded"
|
||||
)
|
||||
|
||||
// ReadOnlySpan allows reading information from the data structure underlying a
|
||||
@@ -108,6 +109,8 @@ type ReadWriteSpan interface {
|
||||
// recordingSpan is an implementation of the OpenTelemetry Span API
|
||||
// representing the individual component of a trace that is sampled.
|
||||
type recordingSpan struct {
|
||||
embedded.Span
|
||||
|
||||
// mu protects the contents of this span.
|
||||
mu sync.Mutex
|
||||
|
||||
@@ -158,8 +161,10 @@ type recordingSpan struct {
|
||||
tracer *tracer
|
||||
}
|
||||
|
||||
var _ ReadWriteSpan = (*recordingSpan)(nil)
|
||||
var _ runtimeTracer = (*recordingSpan)(nil)
|
||||
var (
|
||||
_ ReadWriteSpan = (*recordingSpan)(nil)
|
||||
_ runtimeTracer = (*recordingSpan)(nil)
|
||||
)
|
||||
|
||||
// SpanContext returns the SpanContext of this span.
|
||||
func (s *recordingSpan) SpanContext() trace.SpanContext {
|
||||
@@ -772,6 +777,8 @@ func (s *recordingSpan) runtimeTrace(ctx context.Context) context.Context {
|
||||
// that wraps a SpanContext. It performs no operations other than to return
|
||||
// the wrapped SpanContext or TracerProvider that created it.
|
||||
type nonRecordingSpan struct {
|
||||
embedded.Span
|
||||
|
||||
// tracer is the SDK tracer that created this span.
|
||||
tracer *tracer
|
||||
sc trace.SpanContext
|
||||
|
3
vendor/go.opentelemetry.io/otel/sdk/trace/tracer.go
generated
vendored
3
vendor/go.opentelemetry.io/otel/sdk/trace/tracer.go
generated
vendored
@@ -20,9 +20,12 @@ import (
|
||||
|
||||
"go.opentelemetry.io/otel/sdk/instrumentation"
|
||||
"go.opentelemetry.io/otel/trace"
|
||||
"go.opentelemetry.io/otel/trace/embedded"
|
||||
)
|
||||
|
||||
type tracer struct {
|
||||
embedded.Tracer
|
||||
|
||||
provider *TracerProvider
|
||||
instrumentationScope instrumentation.Scope
|
||||
}
|
||||
|
1
vendor/go.opentelemetry.io/otel/sdk/trace/tracetest/span.go
generated
vendored
1
vendor/go.opentelemetry.io/otel/sdk/trace/tracetest/span.go
generated
vendored
@@ -162,6 +162,7 @@ func (s spanSnapshot) Resource() *resource.Resource { return s.resource }
|
||||
func (s spanSnapshot) InstrumentationScope() instrumentation.Scope {
|
||||
return s.instrumentationScope
|
||||
}
|
||||
|
||||
func (s spanSnapshot) InstrumentationLibrary() instrumentation.Library {
|
||||
return s.instrumentationScope
|
||||
}
|
||||
|
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.
|
||||
func Version() string {
|
||||
return "1.19.0"
|
||||
return "1.21.0"
|
||||
}
|
||||
|
1
vendor/go.opentelemetry.io/otel/trace/config.go
generated
vendored
1
vendor/go.opentelemetry.io/otel/trace/config.go
generated
vendored
@@ -268,6 +268,7 @@ func (o stackTraceOption) applyEvent(c EventConfig) EventConfig {
|
||||
c.stackTrace = bool(o)
|
||||
return c
|
||||
}
|
||||
|
||||
func (o stackTraceOption) applySpan(c SpanConfig) SpanConfig {
|
||||
c.stackTrace = bool(o)
|
||||
return c
|
||||
|
64
vendor/go.opentelemetry.io/otel/trace/doc.go
generated
vendored
64
vendor/go.opentelemetry.io/otel/trace/doc.go
generated
vendored
@@ -62,5 +62,69 @@ a default.
|
||||
defer span.End()
|
||||
// ...
|
||||
}
|
||||
|
||||
# API Implementations
|
||||
|
||||
This package does not conform to the standard Go versioning policy; all of its
|
||||
interfaces may have methods added to them without a package major version bump.
|
||||
This non-standard API evolution could surprise an uninformed implementation
|
||||
author. They could unknowingly build their implementation in a way that would
|
||||
result in a runtime panic for their users that update to the new API.
|
||||
|
||||
The API is designed to help inform an instrumentation author about this
|
||||
non-standard API evolution. It requires them to choose a default behavior for
|
||||
unimplemented interface methods. There are three behavior choices they can
|
||||
make:
|
||||
|
||||
- Compilation failure
|
||||
- Panic
|
||||
- Default to another implementation
|
||||
|
||||
All interfaces in this API embed a corresponding interface from
|
||||
[go.opentelemetry.io/otel/trace/embedded]. If an author wants the default
|
||||
behavior of their implementations to be a compilation failure, signaling to
|
||||
their users they need to update to the latest version of that implementation,
|
||||
they need to embed the corresponding interface from
|
||||
[go.opentelemetry.io/otel/trace/embedded] in their implementation. For
|
||||
example,
|
||||
|
||||
import "go.opentelemetry.io/otel/trace/embedded"
|
||||
|
||||
type TracerProvider struct {
|
||||
embedded.TracerProvider
|
||||
// ...
|
||||
}
|
||||
|
||||
If an author wants the default behavior of their implementations to panic, they
|
||||
can embed the API interface directly.
|
||||
|
||||
import "go.opentelemetry.io/otel/trace"
|
||||
|
||||
type TracerProvider struct {
|
||||
trace.TracerProvider
|
||||
// ...
|
||||
}
|
||||
|
||||
This option is not recommended. It will lead to publishing packages that
|
||||
contain runtime panics when users update to newer versions of
|
||||
[go.opentelemetry.io/otel/trace], which may be done with a trasitive
|
||||
dependency.
|
||||
|
||||
Finally, an author can embed another implementation in theirs. The embedded
|
||||
implementation will be used for methods not defined by the author. For example,
|
||||
an author who wants to default to silently dropping the call can use
|
||||
[go.opentelemetry.io/otel/trace/noop]:
|
||||
|
||||
import "go.opentelemetry.io/otel/trace/noop"
|
||||
|
||||
type TracerProvider struct {
|
||||
noop.TracerProvider
|
||||
// ...
|
||||
}
|
||||
|
||||
It is strongly recommended that authors only embed
|
||||
[go.opentelemetry.io/otel/trace/noop] if they choose this default behavior.
|
||||
That implementation is the only one OpenTelemetry authors can guarantee will
|
||||
fully implement all the API interfaces when a user updates their API.
|
||||
*/
|
||||
package trace // import "go.opentelemetry.io/otel/trace"
|
||||
|
56
vendor/go.opentelemetry.io/otel/trace/embedded/embedded.go
generated
vendored
Normal file
56
vendor/go.opentelemetry.io/otel/trace/embedded/embedded.go
generated
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
// 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 embedded provides interfaces embedded within the [OpenTelemetry
|
||||
// trace API].
|
||||
//
|
||||
// Implementers of the [OpenTelemetry trace API] can embed the relevant type
|
||||
// from this package into their implementation directly. Doing so will result
|
||||
// in a compilation error for users when the [OpenTelemetry trace API] is
|
||||
// extended (which is something that can happen without a major version bump of
|
||||
// the API package).
|
||||
//
|
||||
// [OpenTelemetry trace API]: https://pkg.go.dev/go.opentelemetry.io/otel/trace
|
||||
package embedded // import "go.opentelemetry.io/otel/trace/embedded"
|
||||
|
||||
// TracerProvider is embedded in
|
||||
// [go.opentelemetry.io/otel/trace.TracerProvider].
|
||||
//
|
||||
// Embed this interface in your implementation of the
|
||||
// [go.opentelemetry.io/otel/trace.TracerProvider] if you want users to
|
||||
// experience a compilation error, signaling they need to update to your latest
|
||||
// implementation, when the [go.opentelemetry.io/otel/trace.TracerProvider]
|
||||
// interface is extended (which is something that can happen without a major
|
||||
// version bump of the API package).
|
||||
type TracerProvider interface{ tracerProvider() }
|
||||
|
||||
// Tracer is embedded in [go.opentelemetry.io/otel/trace.Tracer].
|
||||
//
|
||||
// Embed this interface in your implementation of the
|
||||
// [go.opentelemetry.io/otel/trace.Tracer] if you want users to experience a
|
||||
// compilation error, signaling they need to update to your latest
|
||||
// implementation, when the [go.opentelemetry.io/otel/trace.Tracer] interface
|
||||
// is extended (which is something that can happen without a major version bump
|
||||
// of the API package).
|
||||
type Tracer interface{ tracer() }
|
||||
|
||||
// Span is embedded in [go.opentelemetry.io/otel/trace.Span].
|
||||
//
|
||||
// Embed this interface in your implementation of the
|
||||
// [go.opentelemetry.io/otel/trace.Span] if you want users to experience a
|
||||
// compilation error, signaling they need to update to your latest
|
||||
// implementation, when the [go.opentelemetry.io/otel/trace.Span] interface is
|
||||
// extended (which is something that can happen without a major version bump of
|
||||
// the API package).
|
||||
type Span interface{ span() }
|
10
vendor/go.opentelemetry.io/otel/trace/noop.go
generated
vendored
10
vendor/go.opentelemetry.io/otel/trace/noop.go
generated
vendored
@@ -19,16 +19,20 @@ import (
|
||||
|
||||
"go.opentelemetry.io/otel/attribute"
|
||||
"go.opentelemetry.io/otel/codes"
|
||||
"go.opentelemetry.io/otel/trace/embedded"
|
||||
)
|
||||
|
||||
// NewNoopTracerProvider returns an implementation of TracerProvider that
|
||||
// performs no operations. The Tracer and Spans created from the returned
|
||||
// TracerProvider also perform no operations.
|
||||
//
|
||||
// Deprecated: Use [go.opentelemetry.io/otel/trace/noop.NewTracerProvider]
|
||||
// instead.
|
||||
func NewNoopTracerProvider() TracerProvider {
|
||||
return noopTracerProvider{}
|
||||
}
|
||||
|
||||
type noopTracerProvider struct{}
|
||||
type noopTracerProvider struct{ embedded.TracerProvider }
|
||||
|
||||
var _ TracerProvider = noopTracerProvider{}
|
||||
|
||||
@@ -38,7 +42,7 @@ func (p noopTracerProvider) Tracer(string, ...TracerOption) Tracer {
|
||||
}
|
||||
|
||||
// noopTracer is an implementation of Tracer that performs no operations.
|
||||
type noopTracer struct{}
|
||||
type noopTracer struct{ embedded.Tracer }
|
||||
|
||||
var _ Tracer = noopTracer{}
|
||||
|
||||
@@ -54,7 +58,7 @@ func (t noopTracer) Start(ctx context.Context, name string, _ ...SpanStartOption
|
||||
}
|
||||
|
||||
// noopSpan is an implementation of Span that performs no operations.
|
||||
type noopSpan struct{}
|
||||
type noopSpan struct{ embedded.Span }
|
||||
|
||||
var _ Span = noopSpan{}
|
||||
|
||||
|
118
vendor/go.opentelemetry.io/otel/trace/noop/noop.go
generated
vendored
Normal file
118
vendor/go.opentelemetry.io/otel/trace/noop/noop.go
generated
vendored
Normal file
@@ -0,0 +1,118 @@
|
||||
// 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 trace API that
|
||||
// produces no telemetry and minimizes used computation resources.
|
||||
//
|
||||
// Using this package to implement the OpenTelemetry trace API will effectively
|
||||
// disable OpenTelemetry.
|
||||
//
|
||||
// This implementation can be embedded in other implementations of the
|
||||
// OpenTelemetry trace API. Doing so will mean the implementation defaults to
|
||||
// no operation for methods it does not implement.
|
||||
package noop // import "go.opentelemetry.io/otel/trace/noop"
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"go.opentelemetry.io/otel/attribute"
|
||||
"go.opentelemetry.io/otel/codes"
|
||||
"go.opentelemetry.io/otel/trace"
|
||||
"go.opentelemetry.io/otel/trace/embedded"
|
||||
)
|
||||
|
||||
var (
|
||||
// Compile-time check this implements the OpenTelemetry API.
|
||||
|
||||
_ trace.TracerProvider = TracerProvider{}
|
||||
_ trace.Tracer = Tracer{}
|
||||
_ trace.Span = Span{}
|
||||
)
|
||||
|
||||
// TracerProvider is an OpenTelemetry No-Op TracerProvider.
|
||||
type TracerProvider struct{ embedded.TracerProvider }
|
||||
|
||||
// NewTracerProvider returns a TracerProvider that does not record any telemetry.
|
||||
func NewTracerProvider() TracerProvider {
|
||||
return TracerProvider{}
|
||||
}
|
||||
|
||||
// Tracer returns an OpenTelemetry Tracer that does not record any telemetry.
|
||||
func (TracerProvider) Tracer(string, ...trace.TracerOption) trace.Tracer {
|
||||
return Tracer{}
|
||||
}
|
||||
|
||||
// Tracer is an OpenTelemetry No-Op Tracer.
|
||||
type Tracer struct{ embedded.Tracer }
|
||||
|
||||
// Start creates a span. The created span will be set in a child context of ctx
|
||||
// and returned with the span.
|
||||
//
|
||||
// If ctx contains a span context, the returned span will also contain that
|
||||
// span context. If the span context in ctx is for a non-recording span, that
|
||||
// span instance will be returned directly.
|
||||
func (t Tracer) Start(ctx context.Context, _ string, _ ...trace.SpanStartOption) (context.Context, trace.Span) {
|
||||
span := trace.SpanFromContext(ctx)
|
||||
|
||||
// If the parent context contains a non-zero span context, that span
|
||||
// context needs to be returned as a non-recording span
|
||||
// (https://github.com/open-telemetry/opentelemetry-specification/blob/3a1dde966a4ce87cce5adf464359fe369741bbea/specification/trace/api.md#behavior-of-the-api-in-the-absence-of-an-installed-sdk).
|
||||
var zeroSC trace.SpanContext
|
||||
if sc := span.SpanContext(); !sc.Equal(zeroSC) {
|
||||
if !span.IsRecording() {
|
||||
// If the span is not recording return it directly.
|
||||
return ctx, span
|
||||
}
|
||||
// Otherwise, return the span context needs in a non-recording span.
|
||||
span = Span{sc: sc}
|
||||
} else {
|
||||
// No parent, return a No-Op span with an empty span context.
|
||||
span = Span{}
|
||||
}
|
||||
return trace.ContextWithSpan(ctx, span), span
|
||||
}
|
||||
|
||||
// Span is an OpenTelemetry No-Op Span.
|
||||
type Span struct {
|
||||
embedded.Span
|
||||
|
||||
sc trace.SpanContext
|
||||
}
|
||||
|
||||
// SpanContext returns an empty span context.
|
||||
func (s Span) SpanContext() trace.SpanContext { return s.sc }
|
||||
|
||||
// IsRecording always returns false.
|
||||
func (Span) IsRecording() bool { return false }
|
||||
|
||||
// SetStatus does nothing.
|
||||
func (Span) SetStatus(codes.Code, string) {}
|
||||
|
||||
// SetAttributes does nothing.
|
||||
func (Span) SetAttributes(...attribute.KeyValue) {}
|
||||
|
||||
// End does nothing.
|
||||
func (Span) End(...trace.SpanEndOption) {}
|
||||
|
||||
// RecordError does nothing.
|
||||
func (Span) RecordError(error, ...trace.EventOption) {}
|
||||
|
||||
// AddEvent does nothing.
|
||||
func (Span) AddEvent(string, ...trace.EventOption) {}
|
||||
|
||||
// SetName does nothing.
|
||||
func (Span) SetName(string) {}
|
||||
|
||||
// TracerProvider returns a No-Op TracerProvider.
|
||||
func (Span) TracerProvider() trace.TracerProvider { return TracerProvider{} }
|
40
vendor/go.opentelemetry.io/otel/trace/trace.go
generated
vendored
40
vendor/go.opentelemetry.io/otel/trace/trace.go
generated
vendored
@@ -22,6 +22,7 @@ import (
|
||||
|
||||
"go.opentelemetry.io/otel/attribute"
|
||||
"go.opentelemetry.io/otel/codes"
|
||||
"go.opentelemetry.io/otel/trace/embedded"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -48,8 +49,10 @@ func (e errorConst) Error() string {
|
||||
// nolint:revive // revive complains about stutter of `trace.TraceID`.
|
||||
type TraceID [16]byte
|
||||
|
||||
var nilTraceID TraceID
|
||||
var _ json.Marshaler = nilTraceID
|
||||
var (
|
||||
nilTraceID TraceID
|
||||
_ json.Marshaler = nilTraceID
|
||||
)
|
||||
|
||||
// IsValid checks whether the trace TraceID is valid. A valid trace ID does
|
||||
// not consist of zeros only.
|
||||
@@ -71,8 +74,10 @@ func (t TraceID) String() string {
|
||||
// SpanID is a unique identity of a span in a trace.
|
||||
type SpanID [8]byte
|
||||
|
||||
var nilSpanID SpanID
|
||||
var _ json.Marshaler = nilSpanID
|
||||
var (
|
||||
nilSpanID SpanID
|
||||
_ json.Marshaler = nilSpanID
|
||||
)
|
||||
|
||||
// IsValid checks whether the SpanID is valid. A valid SpanID does not consist
|
||||
// of zeros only.
|
||||
@@ -338,8 +343,15 @@ func (sc SpanContext) MarshalJSON() ([]byte, error) {
|
||||
// create a Span and it is then up to the operation the Span represents to
|
||||
// properly end the Span when the operation itself ends.
|
||||
//
|
||||
// Warning: methods may be added to this interface in minor releases.
|
||||
// Warning: Methods may be added to this interface in minor releases. See
|
||||
// package documentation on API implementation for information on how to set
|
||||
// default behavior for unimplemented methods.
|
||||
type Span interface {
|
||||
// Users of the interface can ignore this. This embedded type is only used
|
||||
// by implementations of this interface. See the "API Implementations"
|
||||
// section of the package documentation for more information.
|
||||
embedded.Span
|
||||
|
||||
// End completes the Span. The Span is considered complete and ready to be
|
||||
// delivered through the rest of the telemetry pipeline after this method
|
||||
// is called. Therefore, updates to the Span are not allowed after this
|
||||
@@ -486,8 +498,15 @@ func (sk SpanKind) String() string {
|
||||
|
||||
// Tracer is the creator of Spans.
|
||||
//
|
||||
// Warning: methods may be added to this interface in minor releases.
|
||||
// Warning: Methods may be added to this interface in minor releases. See
|
||||
// package documentation on API implementation for information on how to set
|
||||
// default behavior for unimplemented methods.
|
||||
type Tracer interface {
|
||||
// Users of the interface can ignore this. This embedded type is only used
|
||||
// by implementations of this interface. See the "API Implementations"
|
||||
// section of the package documentation for more information.
|
||||
embedded.Tracer
|
||||
|
||||
// Start creates a span and a context.Context containing the newly-created span.
|
||||
//
|
||||
// If the context.Context provided in `ctx` contains a Span then the newly-created
|
||||
@@ -518,8 +537,15 @@ type Tracer interface {
|
||||
// at runtime from its users or it can simply use the globally registered one
|
||||
// (see https://pkg.go.dev/go.opentelemetry.io/otel#GetTracerProvider).
|
||||
//
|
||||
// Warning: methods may be added to this interface in minor releases.
|
||||
// Warning: Methods may be added to this interface in minor releases. See
|
||||
// package documentation on API implementation for information on how to set
|
||||
// default behavior for unimplemented methods.
|
||||
type TracerProvider interface {
|
||||
// Users of the interface can ignore this. This embedded type is only used
|
||||
// by implementations of this interface. See the "API Implementations"
|
||||
// section of the package documentation for more information.
|
||||
embedded.TracerProvider
|
||||
|
||||
// Tracer returns a unique Tracer scoped to be used by instrumentation code
|
||||
// to trace computational workflows. The scope and identity of that
|
||||
// instrumentation code is uniquely defined by the name and options passed.
|
||||
|
38
vendor/go.opentelemetry.io/otel/trace/tracestate.go
generated
vendored
38
vendor/go.opentelemetry.io/otel/trace/tracestate.go
generated
vendored
@@ -28,9 +28,9 @@ const (
|
||||
|
||||
// based on the W3C Trace Context specification, see
|
||||
// https://www.w3.org/TR/trace-context-1/#tracestate-header
|
||||
noTenantKeyFormat = `[a-z][_0-9a-z\-\*\/]{0,255}`
|
||||
withTenantKeyFormat = `[a-z0-9][_0-9a-z\-\*\/]{0,240}@[a-z][_0-9a-z\-\*\/]{0,13}`
|
||||
valueFormat = `[\x20-\x2b\x2d-\x3c\x3e-\x7e]{0,255}[\x21-\x2b\x2d-\x3c\x3e-\x7e]`
|
||||
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"
|
||||
errInvalidValue errorConst = "invalid tracestate value"
|
||||
@@ -40,9 +40,10 @@ const (
|
||||
)
|
||||
|
||||
var (
|
||||
keyRe = regexp.MustCompile(`^((` + noTenantKeyFormat + `)|(` + withTenantKeyFormat + `))$`)
|
||||
valueRe = regexp.MustCompile(`^(` + valueFormat + `)$`)
|
||||
memberRe = regexp.MustCompile(`^\s*((` + noTenantKeyFormat + `)|(` + withTenantKeyFormat + `))=(` + valueFormat + `)\s*$`)
|
||||
noTenantKeyRe = regexp.MustCompile(`^` + noTenantKeyFormat + `$`)
|
||||
withTenantKeyRe = regexp.MustCompile(`^` + withTenantKeyFormat + `$`)
|
||||
valueRe = regexp.MustCompile(`^` + valueFormat + `$`)
|
||||
memberRe = regexp.MustCompile(`^\s*((?:` + noTenantKeyFormat + `)|(?:` + withTenantKeyFormat + `))=(` + valueFormat + `)\s*$`)
|
||||
)
|
||||
|
||||
type member struct {
|
||||
@@ -51,10 +52,19 @@ type member struct {
|
||||
}
|
||||
|
||||
func newMember(key, value string) (member, error) {
|
||||
if !keyRe.MatchString(key) {
|
||||
if len(key) > 256 {
|
||||
return member{}, fmt.Errorf("%w: %s", errInvalidKey, key)
|
||||
}
|
||||
if !valueRe.MatchString(value) {
|
||||
if !noTenantKeyRe.MatchString(key) {
|
||||
if !withTenantKeyRe.MatchString(key) {
|
||||
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
|
||||
@@ -62,14 +72,14 @@ func newMember(key, value string) (member, error) {
|
||||
|
||||
func parseMember(m string) (member, error) {
|
||||
matches := memberRe.FindStringSubmatch(m)
|
||||
if len(matches) != 5 {
|
||||
if len(matches) != 3 {
|
||||
return member{}, fmt.Errorf("%w: %s", errInvalidMember, m)
|
||||
}
|
||||
|
||||
return member{
|
||||
Key: matches[1],
|
||||
Value: matches[4],
|
||||
}, nil
|
||||
result, e := newMember(matches[1], matches[2])
|
||||
if e != nil {
|
||||
return member{}, fmt.Errorf("%w: %s", errInvalidMember, m)
|
||||
}
|
||||
return result, nil
|
||||
}
|
||||
|
||||
// String encodes member into a string compliant with the W3C Trace Context
|
||||
|
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.
|
||||
func Version() string {
|
||||
return "1.19.0"
|
||||
return "1.21.0"
|
||||
}
|
||||
|
7
vendor/go.opentelemetry.io/otel/versions.yaml
generated
vendored
7
vendor/go.opentelemetry.io/otel/versions.yaml
generated
vendored
@@ -14,13 +14,12 @@
|
||||
|
||||
module-sets:
|
||||
stable-v1:
|
||||
version: v1.19.0
|
||||
version: v1.21.0
|
||||
modules:
|
||||
- go.opentelemetry.io/otel
|
||||
- go.opentelemetry.io/otel/bridge/opentracing
|
||||
- go.opentelemetry.io/otel/bridge/opentracing/test
|
||||
- go.opentelemetry.io/otel/example/dice
|
||||
- go.opentelemetry.io/otel/example/fib
|
||||
- go.opentelemetry.io/otel/example/namedtracer
|
||||
- go.opentelemetry.io/otel/example/otel-collector
|
||||
- go.opentelemetry.io/otel/example/passthrough
|
||||
@@ -35,14 +34,12 @@ module-sets:
|
||||
- go.opentelemetry.io/otel/sdk/metric
|
||||
- go.opentelemetry.io/otel/trace
|
||||
experimental-metrics:
|
||||
version: v0.42.0
|
||||
version: v0.44.0
|
||||
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/view
|
||||
- go.opentelemetry.io/otel/exporters/otlp/otlpmetric
|
||||
- go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc
|
||||
- go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp
|
||||
- go.opentelemetry.io/otel/exporters/prometheus
|
||||
|
Reference in New Issue
Block a user