Compare commits
31 Commits
config/con
...
main
Author | SHA1 | Date |
---|---|---|
|
ae6050450e | |
|
8f5b642676 | |
|
0b63adbfef | |
|
85b47ce850 | |
|
8b73477b98 | |
|
0f337b4fd5 | |
|
dd47e6b52c | |
|
f17e470e32 | |
|
ae29ab583a | |
|
bc0e7192c8 | |
|
59a00f4e07 | |
|
3711ca93da | |
|
6ba455438d | |
|
cdc6dff545 | |
|
fea16eb4c6 | |
|
bf4324d1fa | |
|
65c94c6e50 | |
|
7e45e34f41 | |
|
c684ed4919 | |
|
fdf5cf0bf6 | |
|
9b8207fb4d | |
|
79e6823db2 | |
|
2655e760c2 | |
|
c1c9314c6d | |
|
d25dc896cd | |
|
b63f70d5ea | |
|
8797b3ea0f | |
|
210e2918f6 | |
|
267df7e843 | |
|
48e4f356c2 | |
|
ad7e42d17d |
|
@ -0,0 +1,25 @@
|
|||
# Use this changelog template to create an entry for release notes.
|
||||
|
||||
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
|
||||
change_type: bug_fix
|
||||
|
||||
# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver)
|
||||
component: pdata
|
||||
|
||||
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
|
||||
note: Fix null pointer access when copying into a slice with larger cap but smaller len.
|
||||
|
||||
# One or more tracking issues or pull requests related to the change
|
||||
issues: [13523]
|
||||
|
||||
# (Optional) One or more lines of additional information to render under the primary note.
|
||||
# These lines will be padded with 2 spaces and then inserted directly into the document.
|
||||
# Use pipe (|) for multiline entries.
|
||||
subtext:
|
||||
|
||||
# Optional: The change log or logs in which this entry should be included.
|
||||
# e.g. '[user]' or '[user, api]'
|
||||
# Include 'user' if the change is relevant to end users.
|
||||
# Include 'api' if there is a change to a library API.
|
||||
# Default: '[user]'
|
||||
change_logs: [user]
|
|
@ -0,0 +1,4 @@
|
|||
change_type: bug_fix
|
||||
component: confighttp
|
||||
note: Fix middleware configuration field name from "middleware" to "middlewares" for consistency with configgrpc
|
||||
issues: [13444]
|
|
@ -0,0 +1,25 @@
|
|||
# Use this changelog template to create an entry for release notes.
|
||||
|
||||
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
|
||||
change_type: enhancement
|
||||
|
||||
# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver)
|
||||
component: confighttp
|
||||
|
||||
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
|
||||
note: Add option to configure ForceAttemptHTTP2 to support HTTP/1 specific transport settings.
|
||||
|
||||
# One or more tracking issues or pull requests related to the change
|
||||
issues: [13426]
|
||||
|
||||
# (Optional) One or more lines of additional information to render under the primary note.
|
||||
# These lines will be padded with 2 spaces and then inserted directly into the document.
|
||||
# Use pipe (|) for multiline entries.
|
||||
subtext:
|
||||
|
||||
# Optional: The change log or logs in which this entry should be included.
|
||||
# e.g. '[user]' or '[user, api]'
|
||||
# Include 'user' if the change is relevant to end users.
|
||||
# Include 'api' if there is a change to a library API.
|
||||
# Default: '[user]'
|
||||
change_logs: []
|
|
@ -0,0 +1,32 @@
|
|||
# Use this changelog template to create an entry for release notes.
|
||||
|
||||
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
|
||||
change_type: deprecation
|
||||
|
||||
# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver)
|
||||
component: service
|
||||
|
||||
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
|
||||
note: move service.noopTraceProvider feature gate to deprecated stage
|
||||
|
||||
# One or more tracking issues or pull requests related to the change
|
||||
issues: [13492]
|
||||
|
||||
# (Optional) One or more lines of additional information to render under the primary note.
|
||||
# These lines will be padded with 2 spaces and then inserted directly into the document.
|
||||
# Use pipe (|) for multiline entries.
|
||||
subtext: |
|
||||
The functionality of the feature gate is available via configuration with the following telemetry settings:
|
||||
```
|
||||
service:
|
||||
telemetry:
|
||||
traces:
|
||||
level: none
|
||||
```
|
||||
|
||||
# Optional: The change log or logs in which this entry should be included.
|
||||
# e.g. '[user]' or '[user, api]'
|
||||
# Include 'user' if the change is relevant to end users.
|
||||
# Include 'api' if there is a change to a library API.
|
||||
# Default: '[user]'
|
||||
change_logs: []
|
|
@ -0,0 +1,25 @@
|
|||
# Use this changelog template to create an entry for release notes.
|
||||
|
||||
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
|
||||
change_type: enhancement
|
||||
|
||||
# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver)
|
||||
component: pdata
|
||||
|
||||
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
|
||||
note: Improve RemoveIf for slices to not reference anymore the removed memory
|
||||
|
||||
# One or more tracking issues or pull requests related to the change
|
||||
issues: [13522]
|
||||
|
||||
# (Optional) One or more lines of additional information to render under the primary note.
|
||||
# These lines will be padded with 2 spaces and then inserted directly into the document.
|
||||
# Use pipe (|) for multiline entries.
|
||||
subtext:
|
||||
|
||||
# Optional: The change log or logs in which this entry should be included.
|
||||
# e.g. '[user]' or '[user, api]'
|
||||
# Include 'user' if the change is relevant to end users.
|
||||
# Include 'api' if there is a change to a library API.
|
||||
# Default: '[user]'
|
||||
change_logs: [user]
|
|
@ -0,0 +1,25 @@
|
|||
# Use this changelog template to create an entry for release notes.
|
||||
|
||||
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
|
||||
change_type: bug_fix
|
||||
|
||||
# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver)
|
||||
component: confighttp
|
||||
|
||||
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
|
||||
note: Reuse zstd Reader objects
|
||||
|
||||
# One or more tracking issues or pull requests related to the change
|
||||
issues: [11824]
|
||||
|
||||
# (Optional) One or more lines of additional information to render under the primary note.
|
||||
# These lines will be padded with 2 spaces and then inserted directly into the document.
|
||||
# Use pipe (|) for multiline entries.
|
||||
subtext:
|
||||
|
||||
# Optional: The change log or logs in which this entry should be included.
|
||||
# e.g. '[user]' or '[user, api]'
|
||||
# Include 'user' if the change is relevant to end users.
|
||||
# Include 'api' if there is a change to a library API.
|
||||
# Default: '[user]'
|
||||
change_logs: [user]
|
|
@ -24,7 +24,7 @@ jobs:
|
|||
# This condition is to avoid blocking the PR causing the freeze in the first place.
|
||||
if: |
|
||||
(!startsWith(github.event.pull_request.title || github.event.merge_group.head_commit.message, '[chore] Prepare release')) ||
|
||||
(!(github.event.pull_request.user.login == 'otelbot[bot]' || github.event.merge_group.head_commit.author.login == 'otelbot[bot]'))
|
||||
(!(github.event.pull_request.user.login == 'otelbot[bot]' || github.event.merge_group.head_commit.author.name == 'otelbot'))
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
|
|
|
@ -29,12 +29,12 @@ jobs:
|
|||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@4e828ff8d448a8a6e532957b1811f387a63867e8 # v3.29.4
|
||||
uses: github/codeql-action/init@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3.29.5
|
||||
with:
|
||||
languages: go
|
||||
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@4e828ff8d448a8a6e532957b1811f387a63867e8 # v3.29.4
|
||||
uses: github/codeql-action/autobuild@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3.29.5
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@4e828ff8d448a8a6e532957b1811f387a63867e8 # v3.29.4
|
||||
uses: github/codeql-action/analyze@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3.29.5
|
||||
|
|
|
@ -64,6 +64,6 @@ jobs:
|
|||
|
||||
# Upload the results to GitHub's code scanning dashboard.
|
||||
- name: "Upload to code-scanning"
|
||||
uses: github/codeql-action/upload-sarif@4e828ff8d448a8a6e532957b1811f387a63867e8 # v3.29.4
|
||||
uses: github/codeql-action/upload-sarif@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3.29.5
|
||||
with:
|
||||
sarif_file: results.sarif
|
||||
|
|
|
@ -13,7 +13,7 @@ jobs:
|
|||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
|
||||
- name: Run cSpell
|
||||
uses: streetsidesoftware/cspell-action@6f05386161564ebe24dcfa1513cde203230d1edc # v7.1.2
|
||||
uses: streetsidesoftware/cspell-action@dcd03dc3e8a59ec2e360d0c62db517baa0b4bb6d # v7.2.0
|
||||
with:
|
||||
files: |
|
||||
**/*.{md,yaml,yml}
|
||||
|
|
|
@ -8,6 +8,10 @@ formatters:
|
|||
# simplify code: gofmt with `-s` option, true by default
|
||||
simplify: true
|
||||
|
||||
gofumpt:
|
||||
# Choose whether to use the extra rules
|
||||
extra-rules: true
|
||||
|
||||
goimports:
|
||||
# put imports beginning with prefix after 3rd-party packages;
|
||||
# it's a comma-separated list of prefixes
|
||||
|
@ -88,7 +92,6 @@ linters:
|
|||
- filepathJoin
|
||||
- hugeParam
|
||||
- importShadow
|
||||
- paramTypeCombine
|
||||
- rangeValCopy
|
||||
- unnamedResult
|
||||
- whyNoLint
|
||||
|
|
|
@ -93,7 +93,7 @@ common/goimports: $(GOIMPORTS)
|
|||
|
||||
.PHONY: common/gofumpt
|
||||
common/gofumpt: $(GOFUMPT)
|
||||
$(GOFUMPT) -l -w .
|
||||
$(GOFUMPT) -l -w -extra .
|
||||
|
||||
.PHONY: govulncheck
|
||||
govulncheck: $(GOVULNCHECK)
|
||||
|
|
|
@ -25,7 +25,7 @@ require (
|
|||
go.opentelemetry.io/collector/scraper/scrapertest v0.131.0
|
||||
go.opentelemetry.io/otel v1.37.0
|
||||
go.opentelemetry.io/otel/metric v1.37.0
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0
|
||||
go.opentelemetry.io/otel/trace v1.37.0
|
||||
go.uber.org/goleak v1.3.0
|
||||
go.uber.org/zap v1.27.0
|
||||
|
@ -67,7 +67,7 @@ require (
|
|||
go.opentelemetry.io/collector/receiver/xreceiver v0.131.0 // indirect
|
||||
go.opentelemetry.io/contrib/bridges/otelzap v0.12.0 // indirect
|
||||
go.opentelemetry.io/otel/log v0.13.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.36.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.37.0 // indirect
|
||||
go.uber.org/multierr v1.11.0 // indirect
|
||||
go.yaml.in/yaml/v3 v3.0.4 // indirect
|
||||
golang.org/x/net v0.40.0 // indirect
|
||||
|
|
|
@ -75,10 +75,10 @@ go.opentelemetry.io/otel/log/logtest v0.13.0 h1:xxaIcgoEEtnwdgj6D6Uo9K/Dynz9jqIx
|
|||
go.opentelemetry.io/otel/log/logtest v0.13.0/go.mod h1:+OrkmsAH38b+ygyag1tLjSFMYiES5UHggzrtY1IIEA8=
|
||||
go.opentelemetry.io/otel/metric v1.37.0 h1:mvwbQS5m0tbmqML4NqK+e3aDiO02vsf/WgbsdpcPoZE=
|
||||
go.opentelemetry.io/otel/metric v1.37.0/go.mod h1:04wGrZurHYKOc+RKeye86GwKiTb9FKm1WHtO+4EVr2E=
|
||||
go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs=
|
||||
go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4=
|
||||
go.opentelemetry.io/otel/sdk v1.37.0 h1:ItB0QUqnjesGRvNcmAcU0LyvkVyGJ2xftD29bWdDvKI=
|
||||
go.opentelemetry.io/otel/sdk v1.37.0/go.mod h1:VredYzxUvuo2q3WRcDnKDjbdvmO0sCzOvVAiY+yUkAg=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0 h1:90lI228XrB9jCMuSdA0673aubgRobVZFhbjxHHspCPc=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0/go.mod h1:cNen4ZWfiD37l5NhS+Keb5RXVWZWpRE+9WyVCpbo5ps=
|
||||
go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4=
|
||||
go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0=
|
||||
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
||||
|
|
|
@ -357,7 +357,7 @@ func executeTemplate(tmplFile string, md Metadata, goPackage string) ([]byte, er
|
|||
return buf.Bytes(), nil
|
||||
}
|
||||
|
||||
func inlineReplace(tmplFile string, outputFile string, md Metadata, start string, end string, goPackage string) error {
|
||||
func inlineReplace(tmplFile, outputFile string, md Metadata, start, end, goPackage string) error {
|
||||
var readmeContents []byte
|
||||
var err error
|
||||
if readmeContents, err = os.ReadFile(outputFile); err != nil { //nolint:gosec
|
||||
|
@ -386,7 +386,7 @@ func inlineReplace(tmplFile string, outputFile string, md Metadata, start string
|
|||
return nil
|
||||
}
|
||||
|
||||
func generateFile(tmplFile string, outputFile string, md Metadata, goPackage string) error {
|
||||
func generateFile(tmplFile, outputFile string, md Metadata, goPackage string) error {
|
||||
if err := os.Remove(outputFile); err != nil && !errors.Is(err, fs.ErrNotExist) {
|
||||
return fmt.Errorf("unable to remove generated file %q: %w", outputFile, err)
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ require (
|
|||
|
||||
require (
|
||||
github.com/beorn7/perks v1.0.1 // indirect
|
||||
github.com/cenkalti/backoff/v5 v5.0.2 // indirect
|
||||
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.3.0 // indirect
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/ebitengine/purego v0.8.4 // indirect
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
|
||||
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
|
||||
github.com/cenkalti/backoff/v5 v5.0.2 h1:rIfFVxEf1QsI7E1ZHfp/B4DF/6QBAUhmgkxc0H7Zss8=
|
||||
github.com/cenkalti/backoff/v5 v5.0.2/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw=
|
||||
github.com/cenkalti/backoff/v5 v5.0.3 h1:ZN+IMa753KfX5hd8vVaMixjnqRZ3y8CuJKRKj1xcsSM=
|
||||
github.com/cenkalti/backoff/v5 v5.0.3/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw=
|
||||
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
|
||||
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=
|
||||
|
|
|
@ -27,7 +27,7 @@ require (
|
|||
go.opentelemetry.io/otel v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/log v0.13.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.36.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.37.0 // indirect
|
||||
go.uber.org/multierr v1.11.0 // indirect
|
||||
go.uber.org/zap v1.27.0 // indirect
|
||||
|
|
|
@ -53,10 +53,10 @@ go.opentelemetry.io/otel/log/logtest v0.13.0 h1:xxaIcgoEEtnwdgj6D6Uo9K/Dynz9jqIx
|
|||
go.opentelemetry.io/otel/log/logtest v0.13.0/go.mod h1:+OrkmsAH38b+ygyag1tLjSFMYiES5UHggzrtY1IIEA8=
|
||||
go.opentelemetry.io/otel/metric v1.37.0 h1:mvwbQS5m0tbmqML4NqK+e3aDiO02vsf/WgbsdpcPoZE=
|
||||
go.opentelemetry.io/otel/metric v1.37.0/go.mod h1:04wGrZurHYKOc+RKeye86GwKiTb9FKm1WHtO+4EVr2E=
|
||||
go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs=
|
||||
go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4=
|
||||
go.opentelemetry.io/otel/sdk v1.37.0 h1:ItB0QUqnjesGRvNcmAcU0LyvkVyGJ2xftD29bWdDvKI=
|
||||
go.opentelemetry.io/otel/sdk v1.37.0/go.mod h1:VredYzxUvuo2q3WRcDnKDjbdvmO0sCzOvVAiY+yUkAg=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0 h1:90lI228XrB9jCMuSdA0673aubgRobVZFhbjxHHspCPc=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0/go.mod h1:cNen4ZWfiD37l5NhS+Keb5RXVWZWpRE+9WyVCpbo5ps=
|
||||
go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4=
|
||||
go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0=
|
||||
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
||||
|
|
|
@ -7,8 +7,8 @@ require (
|
|||
go.opentelemetry.io/collector/component v1.37.0
|
||||
go.opentelemetry.io/collector/pdata v1.37.0
|
||||
go.opentelemetry.io/otel/metric v1.37.0
|
||||
go.opentelemetry.io/otel/sdk v1.36.0
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0
|
||||
go.opentelemetry.io/otel/sdk v1.37.0
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0
|
||||
go.opentelemetry.io/otel/trace v1.37.0
|
||||
go.uber.org/goleak v1.3.0
|
||||
go.uber.org/multierr v1.11.0
|
||||
|
|
|
@ -53,10 +53,10 @@ go.opentelemetry.io/otel/log/logtest v0.13.0 h1:xxaIcgoEEtnwdgj6D6Uo9K/Dynz9jqIx
|
|||
go.opentelemetry.io/otel/log/logtest v0.13.0/go.mod h1:+OrkmsAH38b+ygyag1tLjSFMYiES5UHggzrtY1IIEA8=
|
||||
go.opentelemetry.io/otel/metric v1.37.0 h1:mvwbQS5m0tbmqML4NqK+e3aDiO02vsf/WgbsdpcPoZE=
|
||||
go.opentelemetry.io/otel/metric v1.37.0/go.mod h1:04wGrZurHYKOc+RKeye86GwKiTb9FKm1WHtO+4EVr2E=
|
||||
go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs=
|
||||
go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4=
|
||||
go.opentelemetry.io/otel/sdk v1.37.0 h1:ItB0QUqnjesGRvNcmAcU0LyvkVyGJ2xftD29bWdDvKI=
|
||||
go.opentelemetry.io/otel/sdk v1.37.0/go.mod h1:VredYzxUvuo2q3WRcDnKDjbdvmO0sCzOvVAiY+yUkAg=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0 h1:90lI228XrB9jCMuSdA0673aubgRobVZFhbjxHHspCPc=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0/go.mod h1:cNen4ZWfiD37l5NhS+Keb5RXVWZWpRE+9WyVCpbo5ps=
|
||||
go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4=
|
||||
go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0=
|
||||
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
||||
|
|
|
@ -26,7 +26,7 @@ require (
|
|||
go.opentelemetry.io/otel v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/log v0.13.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.36.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.37.0 // indirect
|
||||
go.uber.org/multierr v1.11.0 // indirect
|
||||
go.uber.org/zap v1.27.0 // indirect
|
||||
|
|
|
@ -53,10 +53,10 @@ go.opentelemetry.io/otel/log/logtest v0.13.0 h1:xxaIcgoEEtnwdgj6D6Uo9K/Dynz9jqIx
|
|||
go.opentelemetry.io/otel/log/logtest v0.13.0/go.mod h1:+OrkmsAH38b+ygyag1tLjSFMYiES5UHggzrtY1IIEA8=
|
||||
go.opentelemetry.io/otel/metric v1.37.0 h1:mvwbQS5m0tbmqML4NqK+e3aDiO02vsf/WgbsdpcPoZE=
|
||||
go.opentelemetry.io/otel/metric v1.37.0/go.mod h1:04wGrZurHYKOc+RKeye86GwKiTb9FKm1WHtO+4EVr2E=
|
||||
go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs=
|
||||
go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4=
|
||||
go.opentelemetry.io/otel/sdk v1.37.0 h1:ItB0QUqnjesGRvNcmAcU0LyvkVyGJ2xftD29bWdDvKI=
|
||||
go.opentelemetry.io/otel/sdk v1.37.0/go.mod h1:VredYzxUvuo2q3WRcDnKDjbdvmO0sCzOvVAiY+yUkAg=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0 h1:90lI228XrB9jCMuSdA0673aubgRobVZFhbjxHHspCPc=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0/go.mod h1:cNen4ZWfiD37l5NhS+Keb5RXVWZWpRE+9WyVCpbo5ps=
|
||||
go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4=
|
||||
go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0=
|
||||
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
package component // import "go.opentelemetry.io/collector/component"
|
||||
|
||||
import (
|
||||
"encoding"
|
||||
"errors"
|
||||
"fmt"
|
||||
"regexp"
|
||||
|
@ -71,6 +72,12 @@ func MustNewType(strType string) Type {
|
|||
return ty
|
||||
}
|
||||
|
||||
var (
|
||||
_ fmt.Stringer = ID{}
|
||||
_ encoding.TextMarshaler = ID{}
|
||||
_ encoding.TextUnmarshaler = (*ID)(nil)
|
||||
)
|
||||
|
||||
// ID represents the identity for a component. It combines two values:
|
||||
// * type - the Type of the component.
|
||||
// * name - the name of that component.
|
||||
|
@ -100,7 +107,7 @@ func NewIDWithName(typeVal Type, nameVal string) ID {
|
|||
// MustNewIDWithName builds a Type and returns a new ID with the given Type and name.
|
||||
// This is equivalent to NewIDWithName(MustNewType(typeVal), nameVal).
|
||||
// See MustNewType to check the valid values of typeVal.
|
||||
func MustNewIDWithName(typeVal string, nameVal string) ID {
|
||||
func MustNewIDWithName(typeVal, nameVal string) ID {
|
||||
return NewIDWithName(MustNewType(typeVal), nameVal)
|
||||
}
|
||||
|
||||
|
@ -116,7 +123,7 @@ func (id ID) Name() string {
|
|||
|
||||
// MarshalText implements the encoding.TextMarshaler interface.
|
||||
// This marshals the type and name as one string in the config.
|
||||
func (id ID) MarshalText() (text []byte, err error) {
|
||||
func (id ID) MarshalText() ([]byte, error) {
|
||||
return []byte(id.String()), nil
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ require (
|
|||
go.opentelemetry.io/otel v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/log v0.13.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.36.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.37.0 // indirect
|
||||
go.uber.org/multierr v1.11.0 // indirect
|
||||
go.uber.org/zap v1.27.0 // indirect
|
||||
|
|
|
@ -53,10 +53,10 @@ go.opentelemetry.io/otel/log/logtest v0.13.0 h1:xxaIcgoEEtnwdgj6D6Uo9K/Dynz9jqIx
|
|||
go.opentelemetry.io/otel/log/logtest v0.13.0/go.mod h1:+OrkmsAH38b+ygyag1tLjSFMYiES5UHggzrtY1IIEA8=
|
||||
go.opentelemetry.io/otel/metric v1.37.0 h1:mvwbQS5m0tbmqML4NqK+e3aDiO02vsf/WgbsdpcPoZE=
|
||||
go.opentelemetry.io/otel/metric v1.37.0/go.mod h1:04wGrZurHYKOc+RKeye86GwKiTb9FKm1WHtO+4EVr2E=
|
||||
go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs=
|
||||
go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4=
|
||||
go.opentelemetry.io/otel/sdk v1.37.0 h1:ItB0QUqnjesGRvNcmAcU0LyvkVyGJ2xftD29bWdDvKI=
|
||||
go.opentelemetry.io/otel/sdk v1.37.0/go.mod h1:VredYzxUvuo2q3WRcDnKDjbdvmO0sCzOvVAiY+yUkAg=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0 h1:90lI228XrB9jCMuSdA0673aubgRobVZFhbjxHHspCPc=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0/go.mod h1:cNen4ZWfiD37l5NhS+Keb5RXVWZWpRE+9WyVCpbo5ps=
|
||||
go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4=
|
||||
go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0=
|
||||
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
||||
|
|
|
@ -56,6 +56,7 @@ README](../configtls/README.md).
|
|||
- [`idle_conn_timeout`](https://golang.org/pkg/net/http/#Transport)
|
||||
- [`auth`](../configauth/README.md)
|
||||
- [`disable_keep_alives`](https://golang.org/pkg/net/http/#Transport)
|
||||
- [`force_attempt_http2`](https://golang.org/pkg/net/http/#Transport)
|
||||
- [`http2_read_idle_timeout`](https://pkg.go.dev/golang.org/x/net/http2#Transport)
|
||||
- [`http2_ping_timeout`](https://pkg.go.dev/golang.org/x/net/http2#Transport)
|
||||
- [`cookies`](https://pkg.go.dev/net/http#CookieJar)
|
||||
|
|
|
@ -14,6 +14,7 @@ import (
|
|||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"sync"
|
||||
|
||||
"github.com/golang/snappy"
|
||||
"github.com/klauspost/compress/zstd"
|
||||
|
@ -38,6 +39,25 @@ type compressRoundTripper struct {
|
|||
compressor *compressor
|
||||
}
|
||||
|
||||
var zstdReaderPool sync.Pool
|
||||
|
||||
type pooledZstdReadCloser struct {
|
||||
inner *zstd.Decoder
|
||||
}
|
||||
|
||||
func (pzrc *pooledZstdReadCloser) Read(dst []byte) (int, error) {
|
||||
return pzrc.inner.Read(dst)
|
||||
}
|
||||
|
||||
func (pzrc *pooledZstdReadCloser) Close() error {
|
||||
err := pzrc.inner.Reset(nil)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
zstdReaderPool.Put(pzrc.inner)
|
||||
return nil
|
||||
}
|
||||
|
||||
var availableDecoders = map[string]func(body io.ReadCloser) (io.ReadCloser, error){
|
||||
"": func(io.ReadCloser) (io.ReadCloser, error) {
|
||||
// Not a compressed payload. Nothing to do.
|
||||
|
@ -51,18 +71,24 @@ var availableDecoders = map[string]func(body io.ReadCloser) (io.ReadCloser, erro
|
|||
return gr, nil
|
||||
},
|
||||
"zstd": func(body io.ReadCloser) (io.ReadCloser, error) {
|
||||
zr, err := zstd.NewReader(
|
||||
body,
|
||||
v := zstdReaderPool.Get()
|
||||
var zr *zstd.Decoder
|
||||
var err error
|
||||
if v == nil {
|
||||
// NOTE(tigrannajaryan):
|
||||
// Concurrency 1 disables async decoding. We don't need async decoding, it is pointless
|
||||
// for our use-case (a server accepting decoding http requests).
|
||||
// Disabling async improves performance (I benchmarked it previously when working
|
||||
// on https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/23257).
|
||||
zstd.WithDecoderConcurrency(1),
|
||||
)
|
||||
zr, err = zstd.NewReader(body, zstd.WithDecoderConcurrency(1))
|
||||
} else {
|
||||
zr = v.(*zstd.Decoder)
|
||||
err = zr.Reset(body)
|
||||
}
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return zr.IOReadCloser(), nil
|
||||
return &pooledZstdReadCloser{inner: zr}, nil
|
||||
},
|
||||
"zlib": func(body io.ReadCloser) (io.ReadCloser, error) {
|
||||
zr, err := zlib.NewReader(body)
|
||||
|
|
|
@ -119,10 +119,15 @@ type ClientConfig struct {
|
|||
// Cookies configures the cookie management of the HTTP client.
|
||||
Cookies CookiesConfig `mapstructure:"cookies,omitempty"`
|
||||
|
||||
// Enabling ForceAttemptHTTP2 forces the HTTP transport to use the HTTP/2 protocol.
|
||||
// By default, this is set to true.
|
||||
// NOTE: HTTP/2 does not support settings such as MaxConnsPerHost, MaxIdleConnsPerHost and MaxIdleConns.
|
||||
ForceAttemptHTTP2 bool `mapstructure:"force_attempt_http2,omitempty"`
|
||||
|
||||
// Middlewares are used to add custom functionality to the HTTP client.
|
||||
// Middleware handlers are called in the order they appear in this list,
|
||||
// with the first middleware becoming the outermost handler.
|
||||
Middlewares []configmiddleware.Config `mapstructure:"middleware,omitempty"`
|
||||
Middlewares []configmiddleware.Config `mapstructure:"middlewares,omitempty"`
|
||||
}
|
||||
|
||||
// CookiesConfig defines the configuration of the HTTP client regarding cookies served by the server.
|
||||
|
@ -141,9 +146,10 @@ func NewDefaultClientConfig() ClientConfig {
|
|||
defaultTransport := http.DefaultTransport.(*http.Transport)
|
||||
|
||||
return ClientConfig{
|
||||
Headers: map[string]configopaque.String{},
|
||||
MaxIdleConns: defaultTransport.MaxIdleConns,
|
||||
IdleConnTimeout: defaultTransport.IdleConnTimeout,
|
||||
Headers: map[string]configopaque.String{},
|
||||
MaxIdleConns: defaultTransport.MaxIdleConns,
|
||||
IdleConnTimeout: defaultTransport.IdleConnTimeout,
|
||||
ForceAttemptHTTP2: true,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -184,6 +190,7 @@ func (hcs *ClientConfig) ToClient(ctx context.Context, host component.Host, sett
|
|||
transport.MaxIdleConnsPerHost = hcs.MaxIdleConnsPerHost
|
||||
transport.MaxConnsPerHost = hcs.MaxConnsPerHost
|
||||
transport.IdleConnTimeout = hcs.IdleConnTimeout
|
||||
transport.ForceAttemptHTTP2 = hcs.ForceAttemptHTTP2
|
||||
|
||||
// Setting the Proxy URL
|
||||
if hcs.ProxyURL != "" {
|
||||
|
@ -372,7 +379,7 @@ type ServerConfig struct {
|
|||
// Middlewares are used to add custom functionality to the HTTP server.
|
||||
// Middleware handlers are called in the order they appear in this list,
|
||||
// with the first middleware becoming the outermost handler.
|
||||
Middlewares []configmiddleware.Config `mapstructure:"middleware,omitempty"`
|
||||
Middlewares []configmiddleware.Config `mapstructure:"middlewares,omitempty"`
|
||||
}
|
||||
|
||||
// NewDefaultServerConfig returns ServerConfig type object with default values.
|
||||
|
|
|
@ -28,9 +28,12 @@ import (
|
|||
"go.opentelemetry.io/collector/component/componenttest"
|
||||
"go.opentelemetry.io/collector/config/configauth"
|
||||
"go.opentelemetry.io/collector/config/configcompression"
|
||||
"go.opentelemetry.io/collector/config/configmiddleware"
|
||||
"go.opentelemetry.io/collector/config/configopaque"
|
||||
"go.opentelemetry.io/collector/config/configoptional"
|
||||
"go.opentelemetry.io/collector/config/configtls"
|
||||
"go.opentelemetry.io/collector/confmap/confmaptest"
|
||||
"go.opentelemetry.io/collector/confmap/xconfmap"
|
||||
"go.opentelemetry.io/collector/extension"
|
||||
"go.opentelemetry.io/collector/extension/extensionauth"
|
||||
"go.opentelemetry.io/collector/extension/extensionauth/extensionauthtest"
|
||||
|
@ -98,6 +101,28 @@ func TestAllHTTPClientSettings(t *testing.T) {
|
|||
},
|
||||
shouldError: false,
|
||||
},
|
||||
{
|
||||
name: "all_valid_settings_http2_enabled",
|
||||
settings: ClientConfig{
|
||||
Endpoint: "localhost:1234",
|
||||
TLS: configtls.ClientConfig{
|
||||
Insecure: false,
|
||||
},
|
||||
ReadBufferSize: 1024,
|
||||
WriteBufferSize: 512,
|
||||
MaxIdleConns: maxIdleConns,
|
||||
MaxIdleConnsPerHost: maxIdleConnsPerHost,
|
||||
MaxConnsPerHost: maxConnsPerHost,
|
||||
ForceAttemptHTTP2: true,
|
||||
IdleConnTimeout: idleConnTimeout,
|
||||
Compression: "",
|
||||
DisableKeepAlives: true,
|
||||
Cookies: CookiesConfig{Enabled: true},
|
||||
HTTP2ReadIdleTimeout: idleConnTimeout,
|
||||
HTTP2PingTimeout: http2PingTimeout,
|
||||
},
|
||||
shouldError: false,
|
||||
},
|
||||
{
|
||||
name: "all_valid_settings_with_none_compression",
|
||||
settings: ClientConfig{
|
||||
|
@ -696,8 +721,9 @@ func TestHttpReception(t *testing.T) {
|
|||
}
|
||||
|
||||
hcs := &ClientConfig{
|
||||
Endpoint: prefix + ln.Addr().String(),
|
||||
TLS: *tt.tlsClientCreds,
|
||||
Endpoint: prefix + ln.Addr().String(),
|
||||
TLS: *tt.tlsClientCreds,
|
||||
ForceAttemptHTTP2: true,
|
||||
}
|
||||
|
||||
client, errClient := hcs.ToClient(context.Background(), componenttest.NewNopHost(), nilProvidersSettings)
|
||||
|
@ -928,7 +954,7 @@ func TestHttpServerHeaders(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func verifyCorsResp(t *testing.T, url string, origin string, set configoptional.Optional[CORSConfig], extraHeader bool, wantStatus int, wantAllowed bool) {
|
||||
func verifyCorsResp(t *testing.T, url, origin string, set configoptional.Optional[CORSConfig], extraHeader bool, wantStatus int, wantAllowed bool) {
|
||||
req, err := http.NewRequest(http.MethodOptions, url, http.NoBody)
|
||||
require.NoError(t, err, "Error creating trace OPTIONS request: %v", err)
|
||||
req.Header.Set("Origin", origin)
|
||||
|
@ -1633,3 +1659,154 @@ func TestHTTPServerTelemetry_Tracing(t *testing.T) {
|
|||
})
|
||||
}
|
||||
}
|
||||
|
||||
// TestUnmarshalYAMLWithMiddlewares tests that the "middlewares" field is correctly
|
||||
// parsed from YAML configurations (fixing the bug where "middleware" was used instead)
|
||||
func TestUnmarshalYAMLWithMiddlewares(t *testing.T) {
|
||||
cm, err := confmaptest.LoadConf(filepath.Join("testdata", "middlewares.yaml"))
|
||||
require.NoError(t, err)
|
||||
|
||||
// Test client configuration
|
||||
var clientConfig ClientConfig
|
||||
clientSub, err := cm.Sub("client")
|
||||
require.NoError(t, err)
|
||||
require.NoError(t, clientSub.Unmarshal(&clientConfig))
|
||||
|
||||
// Validate the client configuration using reflection-based validation
|
||||
require.NoError(t, xconfmap.Validate(&clientConfig), "Client configuration should be valid")
|
||||
|
||||
assert.Equal(t, "http://localhost:4318/v1/traces", clientConfig.Endpoint)
|
||||
require.Len(t, clientConfig.Middlewares, 2)
|
||||
assert.Equal(t, component.MustNewID("fancy_middleware"), clientConfig.Middlewares[0].ID)
|
||||
assert.Equal(t, component.MustNewID("careful_middleware"), clientConfig.Middlewares[1].ID)
|
||||
|
||||
// Test server configuration
|
||||
var serverConfig ServerConfig
|
||||
serverSub, err := cm.Sub("server")
|
||||
require.NoError(t, err)
|
||||
require.NoError(t, serverSub.Unmarshal(&serverConfig))
|
||||
|
||||
// Validate the server configuration using reflection-based validation
|
||||
require.NoError(t, xconfmap.Validate(&serverConfig), "Server configuration should be valid")
|
||||
|
||||
assert.Equal(t, "0.0.0.0:4318", serverConfig.Endpoint)
|
||||
require.Len(t, serverConfig.Middlewares, 2)
|
||||
assert.Equal(t, component.MustNewID("careful_middleware"), serverConfig.Middlewares[0].ID)
|
||||
assert.Equal(t, component.MustNewID("support_middleware"), serverConfig.Middlewares[1].ID)
|
||||
}
|
||||
|
||||
// TestUnmarshalYAMLComprehensiveConfig tests the complete configuration example
|
||||
// to ensure all fields including middlewares are parsed correctly
|
||||
func TestUnmarshalYAMLComprehensiveConfig(t *testing.T) {
|
||||
cm, err := confmaptest.LoadConf(filepath.Join("testdata", "config.yaml"))
|
||||
require.NoError(t, err)
|
||||
|
||||
// Test client configuration
|
||||
var clientConfig ClientConfig
|
||||
clientSub, err := cm.Sub("client")
|
||||
require.NoError(t, err)
|
||||
require.NoError(t, clientSub.Unmarshal(&clientConfig))
|
||||
|
||||
// Validate the client configuration using reflection-based validation
|
||||
require.NoError(t, xconfmap.Validate(&clientConfig), "Client configuration should be valid")
|
||||
|
||||
// Verify basic fields
|
||||
assert.Equal(t, "http://example.com:4318/v1/traces", clientConfig.Endpoint)
|
||||
assert.Equal(t, "http://proxy.example.com:8080", clientConfig.ProxyURL)
|
||||
assert.Equal(t, 30*time.Second, clientConfig.Timeout)
|
||||
assert.Equal(t, 4096, clientConfig.ReadBufferSize)
|
||||
assert.Equal(t, 4096, clientConfig.WriteBufferSize)
|
||||
assert.Equal(t, configcompression.TypeGzip, clientConfig.Compression)
|
||||
|
||||
// Verify TLS configuration
|
||||
assert.False(t, clientConfig.TLS.Insecure)
|
||||
assert.Equal(t, "/path/to/client.crt", clientConfig.TLS.CertFile)
|
||||
assert.Equal(t, "/path/to/client.key", clientConfig.TLS.KeyFile)
|
||||
assert.Equal(t, "/path/to/ca.crt", clientConfig.TLS.CAFile)
|
||||
assert.Equal(t, "example.com", clientConfig.TLS.ServerName)
|
||||
|
||||
// Verify headers
|
||||
expectedHeaders := map[string]configopaque.String{
|
||||
"User-Agent": "OpenTelemetry-Collector/1.0",
|
||||
"X-Custom-Header": "custom-value",
|
||||
}
|
||||
assert.Equal(t, expectedHeaders, clientConfig.Headers)
|
||||
|
||||
// Verify middlewares
|
||||
require.Len(t, clientConfig.Middlewares, 2)
|
||||
assert.Equal(t, component.MustNewID("middleware1"), clientConfig.Middlewares[0].ID)
|
||||
assert.Equal(t, component.MustNewID("middleware2"), clientConfig.Middlewares[1].ID)
|
||||
|
||||
// Test server configuration
|
||||
var serverConfig ServerConfig
|
||||
serverSub, err := cm.Sub("server")
|
||||
require.NoError(t, err)
|
||||
require.NoError(t, serverSub.Unmarshal(&serverConfig))
|
||||
|
||||
// Validate the server configuration using reflection-based validation
|
||||
require.NoError(t, xconfmap.Validate(&serverConfig), "Server configuration should be valid")
|
||||
|
||||
// Verify basic fields
|
||||
assert.Equal(t, "0.0.0.0:4318", serverConfig.Endpoint)
|
||||
assert.Equal(t, 30*time.Second, serverConfig.ReadTimeout)
|
||||
assert.Equal(t, 10*time.Second, serverConfig.ReadHeaderTimeout)
|
||||
assert.Equal(t, 30*time.Second, serverConfig.WriteTimeout)
|
||||
assert.Equal(t, 120*time.Second, serverConfig.IdleTimeout)
|
||||
assert.Equal(t, int64(33554432), serverConfig.MaxRequestBodySize)
|
||||
assert.True(t, serverConfig.IncludeMetadata)
|
||||
|
||||
// Verify TLS configuration
|
||||
assert.Equal(t, "/path/to/server.crt", serverConfig.TLS.Get().CertFile)
|
||||
assert.Equal(t, "/path/to/server.key", serverConfig.TLS.Get().KeyFile)
|
||||
assert.Equal(t, "/path/to/ca.crt", serverConfig.TLS.Get().CAFile)
|
||||
assert.Equal(t, "/path/to/client-ca.crt", serverConfig.TLS.Get().ClientCAFile)
|
||||
|
||||
// Verify CORS configuration
|
||||
expectedOrigins := []string{"https://example.com", "https://*.test.com"}
|
||||
assert.Equal(t, expectedOrigins, serverConfig.CORS.Get().AllowedOrigins)
|
||||
corsHeaders := []string{"Content-Type", "Accept"}
|
||||
assert.Equal(t, corsHeaders, serverConfig.CORS.Get().AllowedHeaders)
|
||||
assert.Equal(t, 7200, serverConfig.CORS.Get().MaxAge)
|
||||
|
||||
// Verify response headers
|
||||
expectedResponseHeaders := map[string]configopaque.String{
|
||||
"Server": "OpenTelemetry-Collector",
|
||||
"X-Flavor": "apple",
|
||||
}
|
||||
assert.Equal(t, expectedResponseHeaders, serverConfig.ResponseHeaders)
|
||||
|
||||
// Verify compression algorithms
|
||||
expectedAlgorithms := []string{"", "gzip", "zstd", "zlib", "snappy", "deflate"}
|
||||
assert.Equal(t, expectedAlgorithms, serverConfig.CompressionAlgorithms)
|
||||
|
||||
// Verify middlewares
|
||||
require.Len(t, serverConfig.Middlewares, 3)
|
||||
assert.Equal(t, component.MustNewID("server_middleware1"), serverConfig.Middlewares[0].ID)
|
||||
assert.Equal(t, component.MustNewID("server_middleware2"), serverConfig.Middlewares[1].ID)
|
||||
assert.Equal(t, component.MustNewID("server_middleware3"), serverConfig.Middlewares[2].ID)
|
||||
}
|
||||
|
||||
// TestMiddlewaresFieldCompatibility tests that the new "middlewares" field name
|
||||
// is used instead of the old "middleware" name, ensuring the bug is fixed
|
||||
func TestMiddlewaresFieldCompatibility(t *testing.T) {
|
||||
// Test that we can create a config with middlewares using the new field name
|
||||
clientConfig := ClientConfig{
|
||||
Endpoint: "http://localhost:4318",
|
||||
Middlewares: []configmiddleware.Config{
|
||||
{ID: component.MustNewID("test_middleware")},
|
||||
},
|
||||
}
|
||||
assert.Equal(t, "http://localhost:4318", clientConfig.Endpoint)
|
||||
assert.Len(t, clientConfig.Middlewares, 1)
|
||||
assert.Equal(t, component.MustNewID("test_middleware"), clientConfig.Middlewares[0].ID)
|
||||
|
||||
serverConfig := ServerConfig{
|
||||
Endpoint: "0.0.0.0:4318",
|
||||
Middlewares: []configmiddleware.Config{
|
||||
{ID: component.MustNewID("server_middleware")},
|
||||
},
|
||||
}
|
||||
assert.Equal(t, "0.0.0.0:4318", serverConfig.Endpoint)
|
||||
assert.Len(t, serverConfig.Middlewares, 1)
|
||||
assert.Equal(t, component.MustNewID("server_middleware"), serverConfig.Middlewares[0].ID)
|
||||
}
|
||||
|
|
|
@ -53,7 +53,8 @@ require (
|
|||
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
|
||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
|
||||
go.opentelemetry.io/collector/confmap v1.37.0 // indirect
|
||||
go.opentelemetry.io/collector/confmap v1.37.0
|
||||
go.opentelemetry.io/collector/confmap/xconfmap v0.131.0
|
||||
go.opentelemetry.io/collector/internal/telemetry v0.131.0 // indirect
|
||||
go.opentelemetry.io/collector/pdata v1.37.0 // indirect
|
||||
go.opentelemetry.io/contrib/bridges/otelzap v0.12.0 // indirect
|
||||
|
@ -112,3 +113,5 @@ replace go.opentelemetry.io/collector/featuregate => ../../featuregate
|
|||
replace go.opentelemetry.io/collector/extension/extensionmiddleware/extensionmiddlewaretest => ../../extension/extensionmiddleware/extensionmiddlewaretest
|
||||
|
||||
replace go.opentelemetry.io/collector/confmap => ../../confmap
|
||||
|
||||
replace go.opentelemetry.io/collector/confmap/xconfmap => ../../confmap/xconfmap
|
||||
|
|
|
@ -0,0 +1,111 @@
|
|||
# Comprehensive HTTP configuration example showing all available options
|
||||
# with middleware configurations (using the new "middlewares" field)
|
||||
|
||||
# HTTP Client Configuration
|
||||
client:
|
||||
# The target URL to send data to
|
||||
endpoint: "http://example.com:4318/v1/traces"
|
||||
|
||||
# Proxy URL setting for the collector
|
||||
proxy_url: "http://proxy.example.com:8080"
|
||||
|
||||
# TLS configuration
|
||||
tls:
|
||||
insecure: false
|
||||
cert_file: "/path/to/client.crt"
|
||||
key_file: "/path/to/client.key"
|
||||
ca_file: "/path/to/ca.crt"
|
||||
server_name_override: "example.com"
|
||||
insecure_skip_verify: false
|
||||
|
||||
# HTTP client buffer sizes
|
||||
read_buffer_size: 4096
|
||||
write_buffer_size: 4096
|
||||
|
||||
# Request timeout
|
||||
timeout: 30s
|
||||
|
||||
# Custom headers
|
||||
headers:
|
||||
"User-Agent": "OpenTelemetry-Collector/1.0"
|
||||
"X-Custom-Header": "custom-value"
|
||||
|
||||
# Compression setting
|
||||
compression: "gzip"
|
||||
|
||||
# Disable HTTP/2
|
||||
disable_keep_alives: false
|
||||
http2_read_idle_timeout: 10s
|
||||
http2_ping_timeout: 15s
|
||||
|
||||
# Maximum idle connections
|
||||
max_idle_conns: 100
|
||||
max_idle_conns_per_host: 10
|
||||
max_conns_per_host: 50
|
||||
idle_conn_timeout: 90s
|
||||
|
||||
# Authentication configuration
|
||||
auth:
|
||||
authenticator: "oauth2client"
|
||||
|
||||
# Cookies configuration
|
||||
cookies:
|
||||
enabled: true
|
||||
|
||||
# Middlewares configuration (note: plural "middlewares")
|
||||
middlewares:
|
||||
- id: "middleware1"
|
||||
- id: "middleware2"
|
||||
|
||||
# HTTP Server Configuration
|
||||
server:
|
||||
# Network endpoint configuration
|
||||
endpoint: "0.0.0.0:4318"
|
||||
|
||||
# TLS configuration
|
||||
tls:
|
||||
cert_file: "/path/to/server.crt"
|
||||
key_file: "/path/to/server.key"
|
||||
ca_file: "/path/to/ca.crt"
|
||||
client_ca_file: "/path/to/client-ca.crt"
|
||||
reload_interval: 24h
|
||||
|
||||
# CORS configuration
|
||||
cors:
|
||||
allowed_origins:
|
||||
- "https://example.com"
|
||||
- "https://*.test.com"
|
||||
allowed_headers:
|
||||
- "Content-Type"
|
||||
- "Accept"
|
||||
max_age: 7200
|
||||
|
||||
# Authentication configuration
|
||||
auth:
|
||||
authenticator: "basic"
|
||||
|
||||
# Server timeouts
|
||||
read_timeout: 30s
|
||||
read_header_timeout: 10s
|
||||
write_timeout: 30s
|
||||
idle_timeout: 120s
|
||||
|
||||
# Maximum request size
|
||||
max_request_body_size: 33554432 # 32MB
|
||||
|
||||
# Include metadata in the context
|
||||
include_metadata: true
|
||||
|
||||
# Response headers to add to every response
|
||||
response_headers:
|
||||
"Server": "OpenTelemetry-Collector"
|
||||
"X-Flavor": "apple"
|
||||
|
||||
# Compression algorithms supported by the server
|
||||
compression_algorithms: ["", "gzip", "zstd", "zlib", "snappy", "deflate"]
|
||||
|
||||
# Middlewares configuration (note: plural "middlewares")
|
||||
middlewares:
|
||||
- id: "server_middleware1"
|
||||
- id: "server_middleware2"
|
||||
- id: "server_middleware3"
|
|
@ -0,0 +1,13 @@
|
|||
# Simple middleware-focused test configuration
|
||||
|
||||
client:
|
||||
endpoint: "http://localhost:4318/v1/traces"
|
||||
middlewares:
|
||||
- id: "fancy_middleware"
|
||||
- id: "careful_middleware"
|
||||
|
||||
server:
|
||||
endpoint: "0.0.0.0:4318"
|
||||
middlewares:
|
||||
- id: "careful_middleware"
|
||||
- id: "support_middleware"
|
|
@ -111,3 +111,5 @@ replace go.opentelemetry.io/collector/config/configmiddleware => ../../configmid
|
|||
replace go.opentelemetry.io/collector/extension/extensionmiddleware/extensionmiddlewaretest => ../../../extension/extensionmiddleware/extensionmiddlewaretest
|
||||
|
||||
replace go.opentelemetry.io/collector/confmap => ../../../confmap
|
||||
|
||||
replace go.opentelemetry.io/collector/confmap/xconfmap => ../../../confmap/xconfmap
|
||||
|
|
|
@ -30,7 +30,7 @@ require (
|
|||
go.opentelemetry.io/otel v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/log v0.13.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.36.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.37.0 // indirect
|
||||
go.uber.org/multierr v1.11.0 // indirect
|
||||
go.uber.org/zap v1.27.0 // indirect
|
||||
|
|
|
@ -53,10 +53,10 @@ go.opentelemetry.io/otel/log/logtest v0.13.0 h1:xxaIcgoEEtnwdgj6D6Uo9K/Dynz9jqIx
|
|||
go.opentelemetry.io/otel/log/logtest v0.13.0/go.mod h1:+OrkmsAH38b+ygyag1tLjSFMYiES5UHggzrtY1IIEA8=
|
||||
go.opentelemetry.io/otel/metric v1.37.0 h1:mvwbQS5m0tbmqML4NqK+e3aDiO02vsf/WgbsdpcPoZE=
|
||||
go.opentelemetry.io/otel/metric v1.37.0/go.mod h1:04wGrZurHYKOc+RKeye86GwKiTb9FKm1WHtO+4EVr2E=
|
||||
go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs=
|
||||
go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4=
|
||||
go.opentelemetry.io/otel/sdk v1.37.0 h1:ItB0QUqnjesGRvNcmAcU0LyvkVyGJ2xftD29bWdDvKI=
|
||||
go.opentelemetry.io/otel/sdk v1.37.0/go.mod h1:VredYzxUvuo2q3WRcDnKDjbdvmO0sCzOvVAiY+yUkAg=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0 h1:90lI228XrB9jCMuSdA0673aubgRobVZFhbjxHHspCPc=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0/go.mod h1:cNen4ZWfiD37l5NhS+Keb5RXVWZWpRE+9WyVCpbo5ps=
|
||||
go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4=
|
||||
go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0=
|
||||
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
||||
|
|
|
@ -3,7 +3,7 @@ module go.opentelemetry.io/collector/config/configretry
|
|||
go 1.23.0
|
||||
|
||||
require (
|
||||
github.com/cenkalti/backoff/v5 v5.0.2
|
||||
github.com/cenkalti/backoff/v5 v5.0.3
|
||||
github.com/stretchr/testify v1.10.0
|
||||
go.uber.org/goleak v1.3.0
|
||||
)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
github.com/cenkalti/backoff/v5 v5.0.2 h1:rIfFVxEf1QsI7E1ZHfp/B4DF/6QBAUhmgkxc0H7Zss8=
|
||||
github.com/cenkalti/backoff/v5 v5.0.2/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw=
|
||||
github.com/cenkalti/backoff/v5 v5.0.3 h1:ZN+IMa753KfX5hd8vVaMixjnqRZ3y8CuJKRKj1xcsSM=
|
||||
github.com/cenkalti/backoff/v5 v5.0.3/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw=
|
||||
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
|
|
|
@ -440,7 +440,7 @@ func TestLoadTLSServerConfigFailing(t *testing.T) {
|
|||
assert.NotNil(t, firstClient)
|
||||
}
|
||||
|
||||
func overwriteClientCA(t *testing.T, targetFilePath string, testdataFileName string) {
|
||||
func overwriteClientCA(t *testing.T, targetFilePath, testdataFileName string) {
|
||||
targetFile, err := os.OpenFile(filepath.Clean(targetFilePath), os.O_RDWR, 0o600)
|
||||
require.NoError(t, err)
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ type TPMConfig struct {
|
|||
_ struct{}
|
||||
}
|
||||
|
||||
func (c TPMConfig) tpmCertificate(keyPem []byte, certPem []byte, openTPM func() (transport.TPMCloser, error)) (tls.Certificate, error) {
|
||||
func (c TPMConfig) tpmCertificate(keyPem, certPem []byte, openTPM func() (transport.TPMCloser, error)) (tls.Certificate, error) {
|
||||
tpm, err := openTPM()
|
||||
if err != nil {
|
||||
return tls.Certificate{}, err
|
||||
|
|
|
@ -271,7 +271,7 @@ func (l *Conf) ToStringMap() map[string]any {
|
|||
// uniqueness of component IDs (see mapKeyStringToMapKeyTextUnmarshalerHookFunc).
|
||||
// Decodes time.Duration from strings. Allows custom unmarshaling for structs implementing
|
||||
// encoding.TextUnmarshaler. Allows custom unmarshaling for structs implementing confmap.Unmarshaler.
|
||||
func decodeConfig(m *Conf, result any, errorUnused bool, skipTopLevelUnmarshaler bool) error {
|
||||
func decodeConfig(m *Conf, result any, errorUnused, skipTopLevelUnmarshaler bool) error {
|
||||
dc := &mapstructure.DecoderConfig{
|
||||
ErrorUnused: errorUnused,
|
||||
Result: result,
|
||||
|
@ -360,7 +360,7 @@ func isStringyStructure(t reflect.Type) bool {
|
|||
func safeWrapDecodeHookFunc(
|
||||
f mapstructure.DecodeHookFuncValue,
|
||||
) mapstructure.DecodeHookFuncValue {
|
||||
return func(fromVal reflect.Value, toVal reflect.Value) (any, error) {
|
||||
return func(fromVal, toVal reflect.Value) (any, error) {
|
||||
if !fromVal.IsValid() {
|
||||
return nil, nil
|
||||
}
|
||||
|
@ -417,7 +417,7 @@ func useExpandValue() mapstructure.DecodeHookFuncType {
|
|||
// we want an unmarshaled Config to be equivalent to
|
||||
// Config{Thing: &SomeStruct{}} instead of Config{Thing: nil}
|
||||
func expandNilStructPointersHookFunc() mapstructure.DecodeHookFuncValue {
|
||||
return safeWrapDecodeHookFunc(func(from reflect.Value, to reflect.Value) (any, error) {
|
||||
return safeWrapDecodeHookFunc(func(from, to reflect.Value) (any, error) {
|
||||
// ensure we are dealing with map to map comparison
|
||||
if from.Kind() == reflect.Map && to.Kind() == reflect.Map {
|
||||
toElem := to.Type().Elem()
|
||||
|
@ -447,7 +447,7 @@ func expandNilStructPointersHookFunc() mapstructure.DecodeHookFuncValue {
|
|||
// This is needed in combination with ComponentID, which may produce equal IDs for different strings,
|
||||
// and an error needs to be returned in that case, otherwise the last equivalent ID overwrites the previous one.
|
||||
func mapKeyStringToMapKeyTextUnmarshalerHookFunc() mapstructure.DecodeHookFuncType {
|
||||
return func(from reflect.Type, to reflect.Type, data any) (any, error) {
|
||||
return func(from, to reflect.Type, data any) (any, error) {
|
||||
if from.Kind() != reflect.Map || from.Key().Kind() != reflect.String {
|
||||
return data, nil
|
||||
}
|
||||
|
@ -484,7 +484,7 @@ func mapKeyStringToMapKeyTextUnmarshalerHookFunc() mapstructure.DecodeHookFuncTy
|
|||
// unmarshalerEmbeddedStructsHookFunc provides a mechanism for embedded structs to define their own unmarshal logic,
|
||||
// by implementing the Unmarshaler interface.
|
||||
func unmarshalerEmbeddedStructsHookFunc() mapstructure.DecodeHookFuncValue {
|
||||
return safeWrapDecodeHookFunc(func(from reflect.Value, to reflect.Value) (any, error) {
|
||||
return safeWrapDecodeHookFunc(func(from, to reflect.Value) (any, error) {
|
||||
if to.Type().Kind() != reflect.Struct {
|
||||
return from.Interface(), nil
|
||||
}
|
||||
|
@ -527,7 +527,7 @@ func unmarshalerEmbeddedStructsHookFunc() mapstructure.DecodeHookFuncValue {
|
|||
// by implementing the Unmarshaler interface, unless skipTopLevelUnmarshaler is
|
||||
// true and the struct matches the top level object being unmarshaled.
|
||||
func unmarshalerHookFunc(result any, skipTopLevelUnmarshaler bool) mapstructure.DecodeHookFuncValue {
|
||||
return safeWrapDecodeHookFunc(func(from reflect.Value, to reflect.Value) (any, error) {
|
||||
return safeWrapDecodeHookFunc(func(from, to reflect.Value) (any, error) {
|
||||
if !to.CanAddr() {
|
||||
return from.Interface(), nil
|
||||
}
|
||||
|
@ -567,7 +567,7 @@ func unmarshalerHookFunc(result any, skipTopLevelUnmarshaler bool) mapstructure.
|
|||
// the original to see if they implement the Marshaler interface.
|
||||
func marshalerHookFunc(orig any) mapstructure.DecodeHookFuncValue {
|
||||
origType := reflect.TypeOf(orig)
|
||||
return safeWrapDecodeHookFunc(func(from reflect.Value, _ reflect.Value) (any, error) {
|
||||
return safeWrapDecodeHookFunc(func(from, _ reflect.Value) (any, error) {
|
||||
if from.Kind() != reflect.Struct {
|
||||
return from.Interface(), nil
|
||||
}
|
||||
|
@ -644,7 +644,7 @@ type Marshaler interface {
|
|||
// The nil value is not well understood when layered on top of a default map non-nil value.
|
||||
// The fix is to avoid the assignment and return the previous value.
|
||||
func zeroSliceAndMapHookFunc() mapstructure.DecodeHookFuncValue {
|
||||
return safeWrapDecodeHookFunc(func(from reflect.Value, to reflect.Value) (any, error) {
|
||||
return safeWrapDecodeHookFunc(func(from, to reflect.Value) (any, error) {
|
||||
if to.CanSet() && to.Kind() == reflect.Slice && from.Kind() == reflect.Slice {
|
||||
if !from.IsNil() {
|
||||
// input slice is not nil, set the output slice to a new slice of the same type.
|
||||
|
@ -675,7 +675,7 @@ func (c confmapModuleFactory[T, S]) Create(s S) T {
|
|||
return c.f(s)
|
||||
}
|
||||
|
||||
func newConfmapModuleFactory[T any, S any](f createConfmapFunc[T, S]) moduleFactory[T, S] {
|
||||
func newConfmapModuleFactory[T, S any](f createConfmapFunc[T, S]) moduleFactory[T, S] {
|
||||
return confmapModuleFactory[T, S]{
|
||||
f: f,
|
||||
}
|
||||
|
|
|
@ -225,7 +225,7 @@ func getTagInfo(field reflect.StructField) *tagInfo {
|
|||
// for the encoding.TextMarshaler interface and calls the MarshalText
|
||||
// function if found.
|
||||
func TextMarshalerHookFunc() mapstructure.DecodeHookFuncValue {
|
||||
return func(from reflect.Value, _ reflect.Value) (any, error) {
|
||||
return func(from, _ reflect.Value) (any, error) {
|
||||
marshaler, ok := from.Interface().(encoding.TextMarshaler)
|
||||
if !ok {
|
||||
return from.Interface(), nil
|
||||
|
@ -243,7 +243,7 @@ func TextMarshalerHookFunc() mapstructure.DecodeHookFuncValue {
|
|||
// to map[string]any using the yaml package, which respects the yaml tags. Ultimately,
|
||||
// this allows mapstructure to later marshal the map[string]any in a generic way.
|
||||
func YamlMarshalerHookFunc() mapstructure.DecodeHookFuncValue {
|
||||
return func(from reflect.Value, _ reflect.Value) (any, error) {
|
||||
return func(from, _ reflect.Value) (any, error) {
|
||||
if from.Kind() == reflect.Struct {
|
||||
for i := 0; i < from.NumField(); i++ {
|
||||
if _, ok := from.Type().Field(i).Tag.Lookup("mapstructure"); ok {
|
||||
|
|
|
@ -377,7 +377,7 @@ func TestEncodeNil(t *testing.T) {
|
|||
}
|
||||
|
||||
func testHookFunc() mapstructure.DecodeHookFuncValue {
|
||||
return func(from reflect.Value, _ reflect.Value) (any, error) {
|
||||
return func(from, _ reflect.Value) (any, error) {
|
||||
if from.Kind() != reflect.Struct {
|
||||
return from.Interface(), nil
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ func typedDecodeHook(h mapstructure.DecodeHookFunc) mapstructure.DecodeHookFunc
|
|||
func cachedDecodeHook(raw mapstructure.DecodeHookFunc) func(reflect.Value, reflect.Value) (any, error) {
|
||||
switch f := typedDecodeHook(raw).(type) {
|
||||
case mapstructure.DecodeHookFuncType:
|
||||
return func(from reflect.Value, to reflect.Value) (any, error) {
|
||||
return func(from, to reflect.Value) (any, error) {
|
||||
// CHANGE FROM UPSTREAM: check if from is valid and return nil if not
|
||||
if !from.IsValid() {
|
||||
return nil, nil
|
||||
|
@ -49,7 +49,7 @@ func cachedDecodeHook(raw mapstructure.DecodeHookFunc) func(reflect.Value, refle
|
|||
return f(from.Type(), to.Type(), from.Interface())
|
||||
}
|
||||
case mapstructure.DecodeHookFuncKind:
|
||||
return func(from reflect.Value, to reflect.Value) (any, error) {
|
||||
return func(from, to reflect.Value) (any, error) {
|
||||
// CHANGE FROM UPSTREAM: check if from is valid and return nil if not
|
||||
if !from.IsValid() {
|
||||
return nil, nil
|
||||
|
@ -57,7 +57,7 @@ func cachedDecodeHook(raw mapstructure.DecodeHookFunc) func(reflect.Value, refle
|
|||
return f(from.Kind(), to.Kind(), from.Interface())
|
||||
}
|
||||
case mapstructure.DecodeHookFuncValue:
|
||||
return func(from reflect.Value, to reflect.Value) (any, error) {
|
||||
return func(from, to reflect.Value) (any, error) {
|
||||
return f(from, to)
|
||||
}
|
||||
default:
|
||||
|
@ -80,7 +80,7 @@ func ComposeDecodeHookFunc(fs ...mapstructure.DecodeHookFunc) mapstructure.Decod
|
|||
for _, f := range fs {
|
||||
cached = append(cached, cachedDecodeHook(f))
|
||||
}
|
||||
return func(f reflect.Value, t reflect.Value) (any, error) {
|
||||
return func(f, t reflect.Value) (any, error) {
|
||||
var err error
|
||||
|
||||
// CHANGE FROM UPSTREAM: check if f is valid before calling f.Interface()
|
||||
|
|
|
@ -84,7 +84,7 @@ func mergeSlice(src, dest reflect.Value) any {
|
|||
return slice.Interface()
|
||||
}
|
||||
|
||||
func isPresent(slice reflect.Value, val reflect.Value) bool {
|
||||
func isPresent(slice, val reflect.Value) bool {
|
||||
for i := 0; i < slice.Len(); i++ {
|
||||
if reflect.DeepEqual(val.Interface(), slice.Index(i).Interface()) {
|
||||
return true
|
||||
|
|
|
@ -50,7 +50,7 @@ func answerGet(w http.ResponseWriter, _ *http.Request) {
|
|||
|
||||
// Generate a self signed certificate specific for the tests. Based on
|
||||
// https://go.dev/src/crypto/tls/generate_cert.go
|
||||
func generateCertificate(t *testing.T, hostname string) (cert string, key string, err error) {
|
||||
func generateCertificate(t *testing.T, hostname string) (cert, key string, err error) {
|
||||
priv, err := rsa.GenerateKey(rand.Reader, 2048)
|
||||
if err != nil {
|
||||
return "", "", fmt.Errorf("Failed to generate private key: %w", err)
|
||||
|
|
|
@ -38,13 +38,13 @@ func TestInvalidYAML(t *testing.T) {
|
|||
|
||||
func TestOneValue(t *testing.T) {
|
||||
sp := createProvider()
|
||||
ret, err := sp.Retrieve(context.Background(), "yaml:processors::batch::timeout: 2s", nil)
|
||||
ret, err := sp.Retrieve(context.Background(), "yaml:processors::test::timeout: 2s", nil)
|
||||
require.NoError(t, err)
|
||||
retMap, err := ret.AsConf()
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, map[string]any{
|
||||
"processors": map[string]any{
|
||||
"batch": map[string]any{
|
||||
"test": map[string]any{
|
||||
"timeout": "2s",
|
||||
},
|
||||
},
|
||||
|
@ -54,13 +54,13 @@ func TestOneValue(t *testing.T) {
|
|||
|
||||
func TestNamedComponent(t *testing.T) {
|
||||
sp := createProvider()
|
||||
ret, err := sp.Retrieve(context.Background(), "yaml:processors::batch/foo::timeout: 3s", nil)
|
||||
ret, err := sp.Retrieve(context.Background(), "yaml:processors::test/foo::timeout: 3s", nil)
|
||||
require.NoError(t, err)
|
||||
retMap, err := ret.AsConf()
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, map[string]any{
|
||||
"processors": map[string]any{
|
||||
"batch/foo": map[string]any{
|
||||
"test/foo": map[string]any{
|
||||
"timeout": "3s",
|
||||
},
|
||||
},
|
||||
|
@ -70,16 +70,16 @@ func TestNamedComponent(t *testing.T) {
|
|||
|
||||
func TestMapEntry(t *testing.T) {
|
||||
sp := createProvider()
|
||||
ret, err := sp.Retrieve(context.Background(), "yaml:processors: {batch/foo::timeout: 3s, batch::timeout: 2s}", nil)
|
||||
ret, err := sp.Retrieve(context.Background(), "yaml:processors: {test/foo::timeout: 3s, test::timeout: 2s}", nil)
|
||||
require.NoError(t, err)
|
||||
retMap, err := ret.AsConf()
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, map[string]any{
|
||||
"processors": map[string]any{
|
||||
"batch/foo": map[string]any{
|
||||
"test/foo": map[string]any{
|
||||
"timeout": "3s",
|
||||
},
|
||||
"batch": map[string]any{
|
||||
"test": map[string]any{
|
||||
"timeout": "2s",
|
||||
},
|
||||
},
|
||||
|
@ -106,16 +106,16 @@ func TestArrayEntry(t *testing.T) {
|
|||
|
||||
func TestNewLine(t *testing.T) {
|
||||
sp := createProvider()
|
||||
ret, err := sp.Retrieve(context.Background(), "yaml:processors::batch/foo::timeout: 3s\nprocessors::batch::timeout: 2s", nil)
|
||||
ret, err := sp.Retrieve(context.Background(), "yaml:processors::test/foo::timeout: 3s\nprocessors::test::timeout: 2s", nil)
|
||||
require.NoError(t, err)
|
||||
retMap, err := ret.AsConf()
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, map[string]any{
|
||||
"processors": map[string]any{
|
||||
"batch/foo": map[string]any{
|
||||
"test/foo": map[string]any{
|
||||
"timeout": "3s",
|
||||
},
|
||||
"batch": map[string]any{
|
||||
"test": map[string]any{
|
||||
"timeout": "2s",
|
||||
},
|
||||
},
|
||||
|
@ -125,11 +125,11 @@ func TestNewLine(t *testing.T) {
|
|||
|
||||
func TestDotSeparator(t *testing.T) {
|
||||
sp := createProvider()
|
||||
ret, err := sp.Retrieve(context.Background(), "yaml:processors.batch.timeout: 4s", nil)
|
||||
ret, err := sp.Retrieve(context.Background(), "yaml:processors.test.timeout: 4s", nil)
|
||||
require.NoError(t, err)
|
||||
retMap, err := ret.AsConf()
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, map[string]any{"processors.batch.timeout": "4s"}, retMap.ToStringMap())
|
||||
assert.Equal(t, map[string]any{"processors.test.timeout": "4s"}, retMap.ToStringMap())
|
||||
assert.NoError(t, sp.Shutdown(context.Background()))
|
||||
}
|
||||
|
||||
|
|
|
@ -37,8 +37,8 @@ require (
|
|||
go.opentelemetry.io/otel v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/log v0.13.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.36.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.37.0 // indirect
|
||||
go.uber.org/multierr v1.11.0 // indirect
|
||||
go.uber.org/zap v1.27.0 // indirect
|
||||
|
|
|
@ -53,10 +53,10 @@ go.opentelemetry.io/otel/log/logtest v0.13.0 h1:xxaIcgoEEtnwdgj6D6Uo9K/Dynz9jqIx
|
|||
go.opentelemetry.io/otel/log/logtest v0.13.0/go.mod h1:+OrkmsAH38b+ygyag1tLjSFMYiES5UHggzrtY1IIEA8=
|
||||
go.opentelemetry.io/otel/metric v1.37.0 h1:mvwbQS5m0tbmqML4NqK+e3aDiO02vsf/WgbsdpcPoZE=
|
||||
go.opentelemetry.io/otel/metric v1.37.0/go.mod h1:04wGrZurHYKOc+RKeye86GwKiTb9FKm1WHtO+4EVr2E=
|
||||
go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs=
|
||||
go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4=
|
||||
go.opentelemetry.io/otel/sdk v1.37.0 h1:ItB0QUqnjesGRvNcmAcU0LyvkVyGJ2xftD29bWdDvKI=
|
||||
go.opentelemetry.io/otel/sdk v1.37.0/go.mod h1:VredYzxUvuo2q3WRcDnKDjbdvmO0sCzOvVAiY+yUkAg=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0 h1:90lI228XrB9jCMuSdA0673aubgRobVZFhbjxHHspCPc=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0/go.mod h1:cNen4ZWfiD37l5NhS+Keb5RXVWZWpRE+9WyVCpbo5ps=
|
||||
go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4=
|
||||
go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0=
|
||||
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
||||
|
|
|
@ -43,7 +43,7 @@ connectors:
|
|||
|
||||
### Example Usage
|
||||
|
||||
Annotate distinct log streams, then merge them together, batch, and export.
|
||||
Annotate distinct log streams, then merge them together, and export.
|
||||
|
||||
```yaml
|
||||
receivers:
|
||||
|
@ -119,7 +119,6 @@ service:
|
|||
- foo
|
||||
processors:
|
||||
- filter
|
||||
- batch
|
||||
exporters:
|
||||
- bar
|
||||
# - forward
|
||||
|
|
|
@ -46,8 +46,8 @@ require (
|
|||
go.opentelemetry.io/otel v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/log v0.13.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.36.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.37.0 // indirect
|
||||
go.uber.org/multierr v1.11.0 // indirect
|
||||
go.uber.org/zap v1.27.0 // indirect
|
||||
|
|
|
@ -67,10 +67,10 @@ go.opentelemetry.io/otel/log/logtest v0.13.0 h1:xxaIcgoEEtnwdgj6D6Uo9K/Dynz9jqIx
|
|||
go.opentelemetry.io/otel/log/logtest v0.13.0/go.mod h1:+OrkmsAH38b+ygyag1tLjSFMYiES5UHggzrtY1IIEA8=
|
||||
go.opentelemetry.io/otel/metric v1.37.0 h1:mvwbQS5m0tbmqML4NqK+e3aDiO02vsf/WgbsdpcPoZE=
|
||||
go.opentelemetry.io/otel/metric v1.37.0/go.mod h1:04wGrZurHYKOc+RKeye86GwKiTb9FKm1WHtO+4EVr2E=
|
||||
go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs=
|
||||
go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4=
|
||||
go.opentelemetry.io/otel/sdk v1.37.0 h1:ItB0QUqnjesGRvNcmAcU0LyvkVyGJ2xftD29bWdDvKI=
|
||||
go.opentelemetry.io/otel/sdk v1.37.0/go.mod h1:VredYzxUvuo2q3WRcDnKDjbdvmO0sCzOvVAiY+yUkAg=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0 h1:90lI228XrB9jCMuSdA0673aubgRobVZFhbjxHHspCPc=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0/go.mod h1:cNen4ZWfiD37l5NhS+Keb5RXVWZWpRE+9WyVCpbo5ps=
|
||||
go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4=
|
||||
go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0=
|
||||
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
||||
|
|
|
@ -35,7 +35,7 @@ require (
|
|||
go.opentelemetry.io/otel v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/log v0.13.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.36.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.37.0 // indirect
|
||||
go.uber.org/zap v1.27.0 // indirect
|
||||
golang.org/x/net v0.40.0 // indirect
|
||||
|
|
|
@ -53,10 +53,10 @@ go.opentelemetry.io/otel/log/logtest v0.13.0 h1:xxaIcgoEEtnwdgj6D6Uo9K/Dynz9jqIx
|
|||
go.opentelemetry.io/otel/log/logtest v0.13.0/go.mod h1:+OrkmsAH38b+ygyag1tLjSFMYiES5UHggzrtY1IIEA8=
|
||||
go.opentelemetry.io/otel/metric v1.37.0 h1:mvwbQS5m0tbmqML4NqK+e3aDiO02vsf/WgbsdpcPoZE=
|
||||
go.opentelemetry.io/otel/metric v1.37.0/go.mod h1:04wGrZurHYKOc+RKeye86GwKiTb9FKm1WHtO+4EVr2E=
|
||||
go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs=
|
||||
go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4=
|
||||
go.opentelemetry.io/otel/sdk v1.37.0 h1:ItB0QUqnjesGRvNcmAcU0LyvkVyGJ2xftD29bWdDvKI=
|
||||
go.opentelemetry.io/otel/sdk v1.37.0/go.mod h1:VredYzxUvuo2q3WRcDnKDjbdvmO0sCzOvVAiY+yUkAg=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0 h1:90lI228XrB9jCMuSdA0673aubgRobVZFhbjxHHspCPc=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0/go.mod h1:cNen4ZWfiD37l5NhS+Keb5RXVWZWpRE+9WyVCpbo5ps=
|
||||
go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4=
|
||||
go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0=
|
||||
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
||||
|
|
|
@ -35,7 +35,7 @@ require (
|
|||
go.opentelemetry.io/otel v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/log v0.13.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.36.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.37.0 // indirect
|
||||
go.uber.org/multierr v1.11.0 // indirect
|
||||
go.uber.org/zap v1.27.0 // indirect
|
||||
|
|
|
@ -53,10 +53,10 @@ go.opentelemetry.io/otel/log/logtest v0.13.0 h1:xxaIcgoEEtnwdgj6D6Uo9K/Dynz9jqIx
|
|||
go.opentelemetry.io/otel/log/logtest v0.13.0/go.mod h1:+OrkmsAH38b+ygyag1tLjSFMYiES5UHggzrtY1IIEA8=
|
||||
go.opentelemetry.io/otel/metric v1.37.0 h1:mvwbQS5m0tbmqML4NqK+e3aDiO02vsf/WgbsdpcPoZE=
|
||||
go.opentelemetry.io/otel/metric v1.37.0/go.mod h1:04wGrZurHYKOc+RKeye86GwKiTb9FKm1WHtO+4EVr2E=
|
||||
go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs=
|
||||
go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4=
|
||||
go.opentelemetry.io/otel/sdk v1.37.0 h1:ItB0QUqnjesGRvNcmAcU0LyvkVyGJ2xftD29bWdDvKI=
|
||||
go.opentelemetry.io/otel/sdk v1.37.0/go.mod h1:VredYzxUvuo2q3WRcDnKDjbdvmO0sCzOvVAiY+yUkAg=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0 h1:90lI228XrB9jCMuSdA0673aubgRobVZFhbjxHHspCPc=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0/go.mod h1:cNen4ZWfiD37l5NhS+Keb5RXVWZWpRE+9WyVCpbo5ps=
|
||||
go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4=
|
||||
go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0=
|
||||
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
The collector should be observable and this must naturally include observability of its pipeline components. Pipeline components
|
||||
are those components of the collector which directly interact with data, specifically receivers, processors, exporters, and connectors.
|
||||
|
||||
It is understood that each _type_ (`filelog`, `batch`, etc) of component may emit telemetry describing its internal workings,
|
||||
It is understood that each _type_ (`filelog`, `otlp`, etc) of component may emit telemetry describing its internal workings,
|
||||
and that these internally derived signals may vary greatly based on the concerns and maturity of each component. Naturally
|
||||
though, there is much we can do to normalize the telemetry emitted from and about pipeline components.
|
||||
|
||||
|
|
|
@ -279,8 +279,7 @@ pipelines:
|
|||
```
|
||||
|
||||
The expressions would be executed in order, with each expression either mutating an input telemetry, dropping input
|
||||
telemetry, or adding additional telemetry (usually for stateful processors like batch processor which will drop telemetry
|
||||
for a window and then add them all at the same time). One caveat to note is that we would like to implement optimizations
|
||||
telemetry, or adding additional telemetry. One caveat to note is that we would like to implement optimizations
|
||||
in the transform engine, for example to only apply filtering once for multiple operations with a shared filter. Functions
|
||||
with unknown side effects may cause issues with optimization we will need to explore.
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ require (
|
|||
)
|
||||
|
||||
require (
|
||||
github.com/cenkalti/backoff/v5 v5.0.2 // indirect
|
||||
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/go-logr/logr v1.4.3 // indirect
|
||||
github.com/go-logr/stdr v1.2.2 // indirect
|
||||
|
@ -62,8 +62,8 @@ require (
|
|||
go.opentelemetry.io/otel v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/log v0.13.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.36.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.37.0 // indirect
|
||||
go.uber.org/multierr v1.11.0 // indirect
|
||||
go.yaml.in/yaml/v3 v3.0.4 // indirect
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
github.com/cenkalti/backoff/v5 v5.0.2 h1:rIfFVxEf1QsI7E1ZHfp/B4DF/6QBAUhmgkxc0H7Zss8=
|
||||
github.com/cenkalti/backoff/v5 v5.0.2/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw=
|
||||
github.com/cenkalti/backoff/v5 v5.0.3 h1:ZN+IMa753KfX5hd8vVaMixjnqRZ3y8CuJKRKj1xcsSM=
|
||||
github.com/cenkalti/backoff/v5 v5.0.3/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
|
@ -69,10 +69,10 @@ go.opentelemetry.io/otel/log/logtest v0.13.0 h1:xxaIcgoEEtnwdgj6D6Uo9K/Dynz9jqIx
|
|||
go.opentelemetry.io/otel/log/logtest v0.13.0/go.mod h1:+OrkmsAH38b+ygyag1tLjSFMYiES5UHggzrtY1IIEA8=
|
||||
go.opentelemetry.io/otel/metric v1.37.0 h1:mvwbQS5m0tbmqML4NqK+e3aDiO02vsf/WgbsdpcPoZE=
|
||||
go.opentelemetry.io/otel/metric v1.37.0/go.mod h1:04wGrZurHYKOc+RKeye86GwKiTb9FKm1WHtO+4EVr2E=
|
||||
go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs=
|
||||
go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4=
|
||||
go.opentelemetry.io/otel/sdk v1.37.0 h1:ItB0QUqnjesGRvNcmAcU0LyvkVyGJ2xftD29bWdDvKI=
|
||||
go.opentelemetry.io/otel/sdk v1.37.0/go.mod h1:VredYzxUvuo2q3WRcDnKDjbdvmO0sCzOvVAiY+yUkAg=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0 h1:90lI228XrB9jCMuSdA0673aubgRobVZFhbjxHHspCPc=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0/go.mod h1:cNen4ZWfiD37l5NhS+Keb5RXVWZWpRE+9WyVCpbo5ps=
|
||||
go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4=
|
||||
go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0=
|
||||
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
||||
|
|
|
@ -35,7 +35,7 @@ func writeResourceDetails(schemaURL string) (resourceDetails string) {
|
|||
return resourceDetails
|
||||
}
|
||||
|
||||
func writeScopeDetails(name string, version string, schemaURL string) (scopeDetails string) {
|
||||
func writeScopeDetails(name, version, schemaURL string) (scopeDetails string) {
|
||||
if name != "" {
|
||||
scopeDetails += name
|
||||
}
|
||||
|
|
|
@ -392,7 +392,7 @@ func (pq *persistentQueue[T]) getNextItem(ctx context.Context) (uint64, T, conte
|
|||
}
|
||||
|
||||
// onDone should be called to remove the item of the given index from the queue once processing is finished.
|
||||
func (pq *persistentQueue[T]) onDone(index uint64, itemsSize int64, bytesSize int64, consumeErr error) {
|
||||
func (pq *persistentQueue[T]) onDone(index uint64, itemsSize, bytesSize int64, consumeErr error) {
|
||||
// Delete the item from the persistent storage after it was processed.
|
||||
pq.mu.Lock()
|
||||
// Always unref client even if the consumer is shutdown because we always ref it for every valid request.
|
||||
|
|
|
@ -140,7 +140,7 @@ func (m *fakeBoundedStorageClient) GetSizeInBytes() int {
|
|||
return m.sizeInBytes
|
||||
}
|
||||
|
||||
func (m *fakeBoundedStorageClient) getTotalSizeChange(ops []*storage.Operation) (totalAdded int, totalRemoved int) {
|
||||
func (m *fakeBoundedStorageClient) getTotalSizeChange(ops []*storage.Operation) (totalAdded, totalRemoved int) {
|
||||
totalAdded, totalRemoved = 0, 0
|
||||
for _, op := range ops {
|
||||
switch op.Type {
|
||||
|
|
|
@ -31,7 +31,7 @@ func parentsFromContext(ctx context.Context) []trace.Link {
|
|||
return LinksFromContext(ctx)
|
||||
}
|
||||
|
||||
func contextWithMergedLinks(ctx1 context.Context, ctx2 context.Context) context.Context {
|
||||
func contextWithMergedLinks(ctx1, ctx2 context.Context) context.Context {
|
||||
return context.WithValue(
|
||||
context.Background(),
|
||||
batchSpanLinksKey,
|
||||
|
|
|
@ -72,7 +72,7 @@ func (mb *multiBatcher) Consume(ctx context.Context, req request.Request, done q
|
|||
|
||||
func (mb *multiBatcher) Shutdown(ctx context.Context) error {
|
||||
var wg sync.WaitGroup
|
||||
mb.shards.Range(func(_ any, shard any) bool {
|
||||
mb.shards.Range(func(_, shard any) bool {
|
||||
wg.Add(1)
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
|
|
|
@ -19,13 +19,13 @@ require (
|
|||
go.opentelemetry.io/collector/pdata/xpdata v0.131.0
|
||||
go.opentelemetry.io/collector/pipeline/xpipeline v0.131.0
|
||||
go.opentelemetry.io/otel v1.37.0
|
||||
go.opentelemetry.io/otel/sdk v1.36.0
|
||||
go.opentelemetry.io/otel/sdk v1.37.0
|
||||
go.opentelemetry.io/otel/trace v1.37.0
|
||||
go.uber.org/zap v1.27.0
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/cenkalti/backoff/v5 v5.0.2 // indirect
|
||||
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/go-logr/logr v1.4.3 // indirect
|
||||
github.com/go-logr/stdr v1.2.2 // indirect
|
||||
|
@ -60,7 +60,7 @@ require (
|
|||
go.opentelemetry.io/contrib/bridges/otelzap v0.12.0 // indirect
|
||||
go.opentelemetry.io/otel/log v0.13.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0 // indirect
|
||||
go.uber.org/multierr v1.11.0 // indirect
|
||||
go.yaml.in/yaml/v3 v3.0.4 // indirect
|
||||
golang.org/x/net v0.40.0 // indirect
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
github.com/cenkalti/backoff/v5 v5.0.2 h1:rIfFVxEf1QsI7E1ZHfp/B4DF/6QBAUhmgkxc0H7Zss8=
|
||||
github.com/cenkalti/backoff/v5 v5.0.2/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw=
|
||||
github.com/cenkalti/backoff/v5 v5.0.3 h1:ZN+IMa753KfX5hd8vVaMixjnqRZ3y8CuJKRKj1xcsSM=
|
||||
github.com/cenkalti/backoff/v5 v5.0.3/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
|
@ -69,10 +69,10 @@ go.opentelemetry.io/otel/log/logtest v0.13.0 h1:xxaIcgoEEtnwdgj6D6Uo9K/Dynz9jqIx
|
|||
go.opentelemetry.io/otel/log/logtest v0.13.0/go.mod h1:+OrkmsAH38b+ygyag1tLjSFMYiES5UHggzrtY1IIEA8=
|
||||
go.opentelemetry.io/otel/metric v1.37.0 h1:mvwbQS5m0tbmqML4NqK+e3aDiO02vsf/WgbsdpcPoZE=
|
||||
go.opentelemetry.io/otel/metric v1.37.0/go.mod h1:04wGrZurHYKOc+RKeye86GwKiTb9FKm1WHtO+4EVr2E=
|
||||
go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs=
|
||||
go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4=
|
||||
go.opentelemetry.io/otel/sdk v1.37.0 h1:ItB0QUqnjesGRvNcmAcU0LyvkVyGJ2xftD29bWdDvKI=
|
||||
go.opentelemetry.io/otel/sdk v1.37.0/go.mod h1:VredYzxUvuo2q3WRcDnKDjbdvmO0sCzOvVAiY+yUkAg=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0 h1:90lI228XrB9jCMuSdA0673aubgRobVZFhbjxHHspCPc=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0/go.mod h1:cNen4ZWfiD37l5NhS+Keb5RXVWZWpRE+9WyVCpbo5ps=
|
||||
go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4=
|
||||
go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0=
|
||||
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
||||
|
|
|
@ -22,7 +22,7 @@ require (
|
|||
)
|
||||
|
||||
require (
|
||||
github.com/cenkalti/backoff/v5 v5.0.2 // indirect
|
||||
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/go-logr/logr v1.4.3 // indirect
|
||||
github.com/go-logr/stdr v1.2.2 // indirect
|
||||
|
@ -54,8 +54,8 @@ require (
|
|||
go.opentelemetry.io/otel v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/log v0.13.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.36.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.37.0 // indirect
|
||||
go.uber.org/multierr v1.11.0 // indirect
|
||||
go.uber.org/zap v1.27.0 // indirect
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
github.com/cenkalti/backoff/v5 v5.0.2 h1:rIfFVxEf1QsI7E1ZHfp/B4DF/6QBAUhmgkxc0H7Zss8=
|
||||
github.com/cenkalti/backoff/v5 v5.0.2/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw=
|
||||
github.com/cenkalti/backoff/v5 v5.0.3 h1:ZN+IMa753KfX5hd8vVaMixjnqRZ3y8CuJKRKj1xcsSM=
|
||||
github.com/cenkalti/backoff/v5 v5.0.3/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
|
@ -69,10 +69,10 @@ go.opentelemetry.io/otel/log/logtest v0.13.0 h1:xxaIcgoEEtnwdgj6D6Uo9K/Dynz9jqIx
|
|||
go.opentelemetry.io/otel/log/logtest v0.13.0/go.mod h1:+OrkmsAH38b+ygyag1tLjSFMYiES5UHggzrtY1IIEA8=
|
||||
go.opentelemetry.io/otel/metric v1.37.0 h1:mvwbQS5m0tbmqML4NqK+e3aDiO02vsf/WgbsdpcPoZE=
|
||||
go.opentelemetry.io/otel/metric v1.37.0/go.mod h1:04wGrZurHYKOc+RKeye86GwKiTb9FKm1WHtO+4EVr2E=
|
||||
go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs=
|
||||
go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4=
|
||||
go.opentelemetry.io/otel/sdk v1.37.0 h1:ItB0QUqnjesGRvNcmAcU0LyvkVyGJ2xftD29bWdDvKI=
|
||||
go.opentelemetry.io/otel/sdk v1.37.0/go.mod h1:VredYzxUvuo2q3WRcDnKDjbdvmO0sCzOvVAiY+yUkAg=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0 h1:90lI228XrB9jCMuSdA0673aubgRobVZFhbjxHHspCPc=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0/go.mod h1:cNen4ZWfiD37l5NhS+Keb5RXVWZWpRE+9WyVCpbo5ps=
|
||||
go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4=
|
||||
go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0=
|
||||
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
||||
|
|
|
@ -3,7 +3,7 @@ module go.opentelemetry.io/collector/exporter
|
|||
go 1.23.0
|
||||
|
||||
require (
|
||||
github.com/cenkalti/backoff/v5 v5.0.2
|
||||
github.com/cenkalti/backoff/v5 v5.0.3
|
||||
github.com/gogo/protobuf v1.3.2
|
||||
github.com/stretchr/testify v1.10.0
|
||||
go.opentelemetry.io/collector/client v1.37.0
|
||||
|
@ -26,8 +26,8 @@ require (
|
|||
go.opentelemetry.io/collector/pipeline v0.131.0
|
||||
go.opentelemetry.io/otel v1.37.0
|
||||
go.opentelemetry.io/otel/metric v1.37.0
|
||||
go.opentelemetry.io/otel/sdk v1.36.0
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0
|
||||
go.opentelemetry.io/otel/sdk v1.37.0
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0
|
||||
go.opentelemetry.io/otel/trace v1.37.0
|
||||
go.uber.org/goleak v1.3.0
|
||||
go.uber.org/multierr v1.11.0
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
github.com/cenkalti/backoff/v5 v5.0.2 h1:rIfFVxEf1QsI7E1ZHfp/B4DF/6QBAUhmgkxc0H7Zss8=
|
||||
github.com/cenkalti/backoff/v5 v5.0.2/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw=
|
||||
github.com/cenkalti/backoff/v5 v5.0.3 h1:ZN+IMa753KfX5hd8vVaMixjnqRZ3y8CuJKRKj1xcsSM=
|
||||
github.com/cenkalti/backoff/v5 v5.0.3/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
|
@ -69,10 +69,10 @@ go.opentelemetry.io/otel/log/logtest v0.13.0 h1:xxaIcgoEEtnwdgj6D6Uo9K/Dynz9jqIx
|
|||
go.opentelemetry.io/otel/log/logtest v0.13.0/go.mod h1:+OrkmsAH38b+ygyag1tLjSFMYiES5UHggzrtY1IIEA8=
|
||||
go.opentelemetry.io/otel/metric v1.37.0 h1:mvwbQS5m0tbmqML4NqK+e3aDiO02vsf/WgbsdpcPoZE=
|
||||
go.opentelemetry.io/otel/metric v1.37.0/go.mod h1:04wGrZurHYKOc+RKeye86GwKiTb9FKm1WHtO+4EVr2E=
|
||||
go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs=
|
||||
go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4=
|
||||
go.opentelemetry.io/otel/sdk v1.37.0 h1:ItB0QUqnjesGRvNcmAcU0LyvkVyGJ2xftD29bWdDvKI=
|
||||
go.opentelemetry.io/otel/sdk v1.37.0/go.mod h1:VredYzxUvuo2q3WRcDnKDjbdvmO0sCzOvVAiY+yUkAg=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0 h1:90lI228XrB9jCMuSdA0673aubgRobVZFhbjxHHspCPc=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0/go.mod h1:cNen4ZWfiD37l5NhS+Keb5RXVWZWpRE+9WyVCpbo5ps=
|
||||
go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4=
|
||||
go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0=
|
||||
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
||||
|
|
|
@ -48,8 +48,8 @@ require (
|
|||
go.opentelemetry.io/otel v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/log v0.13.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.36.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.37.0 // indirect
|
||||
go.uber.org/multierr v1.11.0 // indirect
|
||||
go.uber.org/zap v1.27.0 // indirect
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
github.com/cenkalti/backoff/v5 v5.0.2 h1:rIfFVxEf1QsI7E1ZHfp/B4DF/6QBAUhmgkxc0H7Zss8=
|
||||
github.com/cenkalti/backoff/v5 v5.0.2/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw=
|
||||
github.com/cenkalti/backoff/v5 v5.0.3 h1:ZN+IMa753KfX5hd8vVaMixjnqRZ3y8CuJKRKj1xcsSM=
|
||||
github.com/cenkalti/backoff/v5 v5.0.3/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
|
@ -69,10 +69,10 @@ go.opentelemetry.io/otel/log/logtest v0.13.0 h1:xxaIcgoEEtnwdgj6D6Uo9K/Dynz9jqIx
|
|||
go.opentelemetry.io/otel/log/logtest v0.13.0/go.mod h1:+OrkmsAH38b+ygyag1tLjSFMYiES5UHggzrtY1IIEA8=
|
||||
go.opentelemetry.io/otel/metric v1.37.0 h1:mvwbQS5m0tbmqML4NqK+e3aDiO02vsf/WgbsdpcPoZE=
|
||||
go.opentelemetry.io/otel/metric v1.37.0/go.mod h1:04wGrZurHYKOc+RKeye86GwKiTb9FKm1WHtO+4EVr2E=
|
||||
go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs=
|
||||
go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4=
|
||||
go.opentelemetry.io/otel/sdk v1.37.0 h1:ItB0QUqnjesGRvNcmAcU0LyvkVyGJ2xftD29bWdDvKI=
|
||||
go.opentelemetry.io/otel/sdk v1.37.0/go.mod h1:VredYzxUvuo2q3WRcDnKDjbdvmO0sCzOvVAiY+yUkAg=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0 h1:90lI228XrB9jCMuSdA0673aubgRobVZFhbjxHHspCPc=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0/go.mod h1:cNen4ZWfiD37l5NhS+Keb5RXVWZWpRE+9WyVCpbo5ps=
|
||||
go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4=
|
||||
go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0=
|
||||
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
||||
|
|
|
@ -33,7 +33,7 @@ require (
|
|||
)
|
||||
|
||||
require (
|
||||
github.com/cenkalti/backoff/v5 v5.0.2 // indirect
|
||||
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/foxboron/go-tpm-keyfiles v0.0.0-20250323135004-b31fac66206e // indirect
|
||||
github.com/fsnotify/fsnotify v1.9.0 // indirect
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
github.com/cenkalti/backoff/v5 v5.0.2 h1:rIfFVxEf1QsI7E1ZHfp/B4DF/6QBAUhmgkxc0H7Zss8=
|
||||
github.com/cenkalti/backoff/v5 v5.0.2/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw=
|
||||
github.com/cenkalti/backoff/v5 v5.0.3 h1:ZN+IMa753KfX5hd8vVaMixjnqRZ3y8CuJKRKj1xcsSM=
|
||||
github.com/cenkalti/backoff/v5 v5.0.3/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
|
|
|
@ -82,6 +82,7 @@ func TestUnmarshalConfig(t *testing.T) {
|
|||
MaxIdleConnsPerHost: defaultMaxIdleConnsPerHost,
|
||||
MaxConnsPerHost: defaultMaxConnsPerHost,
|
||||
IdleConnTimeout: defaultIdleConnTimeout,
|
||||
ForceAttemptHTTP2: true,
|
||||
},
|
||||
}, cfg)
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ func createDefaultConfig() component.Config {
|
|||
// signalOverrideURL is the URL specified in the signal specific configuration (empty if not specified).
|
||||
// signalName is the name of the signal, e.g. "traces", "metrics", "logs".
|
||||
// signalVersion is the version of the signal, e.g. "v1" or "v1development".
|
||||
func composeSignalURL(oCfg *Config, signalOverrideURL string, signalName string, signalVersion string) (string, error) {
|
||||
func composeSignalURL(oCfg *Config, signalOverrideURL, signalName, signalVersion string) (string, error) {
|
||||
switch {
|
||||
case signalOverrideURL != "":
|
||||
_, err := url.Parse(signalOverrideURL)
|
||||
|
|
|
@ -30,7 +30,7 @@ require (
|
|||
)
|
||||
|
||||
require (
|
||||
github.com/cenkalti/backoff/v5 v5.0.2 // indirect
|
||||
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/felixge/httpsnoop v1.0.4 // indirect
|
||||
github.com/foxboron/go-tpm-keyfiles v0.0.0-20250323135004-b31fac66206e // indirect
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
github.com/cenkalti/backoff/v5 v5.0.2 h1:rIfFVxEf1QsI7E1ZHfp/B4DF/6QBAUhmgkxc0H7Zss8=
|
||||
github.com/cenkalti/backoff/v5 v5.0.2/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw=
|
||||
github.com/cenkalti/backoff/v5 v5.0.3 h1:ZN+IMa753KfX5hd8vVaMixjnqRZ3y8CuJKRKj1xcsSM=
|
||||
github.com/cenkalti/backoff/v5 v5.0.3/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
|
|
|
@ -32,7 +32,7 @@ require (
|
|||
go.opentelemetry.io/otel v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/log v0.13.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.36.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.37.0 // indirect
|
||||
go.uber.org/multierr v1.11.0 // indirect
|
||||
go.uber.org/zap v1.27.0 // indirect
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
github.com/cenkalti/backoff/v5 v5.0.2 h1:rIfFVxEf1QsI7E1ZHfp/B4DF/6QBAUhmgkxc0H7Zss8=
|
||||
github.com/cenkalti/backoff/v5 v5.0.2/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw=
|
||||
github.com/cenkalti/backoff/v5 v5.0.3 h1:ZN+IMa753KfX5hd8vVaMixjnqRZ3y8CuJKRKj1xcsSM=
|
||||
github.com/cenkalti/backoff/v5 v5.0.3/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
|
@ -69,10 +69,10 @@ go.opentelemetry.io/otel/log/logtest v0.13.0 h1:xxaIcgoEEtnwdgj6D6Uo9K/Dynz9jqIx
|
|||
go.opentelemetry.io/otel/log/logtest v0.13.0/go.mod h1:+OrkmsAH38b+ygyag1tLjSFMYiES5UHggzrtY1IIEA8=
|
||||
go.opentelemetry.io/otel/metric v1.37.0 h1:mvwbQS5m0tbmqML4NqK+e3aDiO02vsf/WgbsdpcPoZE=
|
||||
go.opentelemetry.io/otel/metric v1.37.0/go.mod h1:04wGrZurHYKOc+RKeye86GwKiTb9FKm1WHtO+4EVr2E=
|
||||
go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs=
|
||||
go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4=
|
||||
go.opentelemetry.io/otel/sdk v1.37.0 h1:ItB0QUqnjesGRvNcmAcU0LyvkVyGJ2xftD29bWdDvKI=
|
||||
go.opentelemetry.io/otel/sdk v1.37.0/go.mod h1:VredYzxUvuo2q3WRcDnKDjbdvmO0sCzOvVAiY+yUkAg=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0 h1:90lI228XrB9jCMuSdA0673aubgRobVZFhbjxHHspCPc=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0/go.mod h1:cNen4ZWfiD37l5NhS+Keb5RXVWZWpRE+9WyVCpbo5ps=
|
||||
go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4=
|
||||
go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0=
|
||||
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
||||
|
|
|
@ -4,12 +4,13 @@ Extensions provide capabilities on top of the primary functionality of the
|
|||
collector. Generally, extensions are used for implementing components that can
|
||||
be added to the Collector, but which do not require direct access to telemetry
|
||||
data and are not part of the pipelines (like receivers, processors or
|
||||
exporters). Example extensions are: Health Check extension that responds to
|
||||
health check requests or PProf extension that allows fetching Collector's
|
||||
performance profile.
|
||||
exporters). Example extensions are: Memory Limiter extension that prevents
|
||||
out of memory situations or zPages extension that provides live data for
|
||||
debugging different components.
|
||||
|
||||
Supported service extensions (sorted alphabetically):
|
||||
|
||||
- [Memory Limiter](memorylimiterextension/README.md)
|
||||
- [zPages](zpagesextension/README.md)
|
||||
|
||||
The [contributors
|
||||
|
|
|
@ -30,7 +30,7 @@ require (
|
|||
go.opentelemetry.io/otel v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/log v0.13.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.36.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.37.0 // indirect
|
||||
go.uber.org/multierr v1.11.0 // indirect
|
||||
go.uber.org/zap v1.27.0 // indirect
|
||||
|
|
|
@ -53,10 +53,10 @@ go.opentelemetry.io/otel/log/logtest v0.13.0 h1:xxaIcgoEEtnwdgj6D6Uo9K/Dynz9jqIx
|
|||
go.opentelemetry.io/otel/log/logtest v0.13.0/go.mod h1:+OrkmsAH38b+ygyag1tLjSFMYiES5UHggzrtY1IIEA8=
|
||||
go.opentelemetry.io/otel/metric v1.37.0 h1:mvwbQS5m0tbmqML4NqK+e3aDiO02vsf/WgbsdpcPoZE=
|
||||
go.opentelemetry.io/otel/metric v1.37.0/go.mod h1:04wGrZurHYKOc+RKeye86GwKiTb9FKm1WHtO+4EVr2E=
|
||||
go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs=
|
||||
go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4=
|
||||
go.opentelemetry.io/otel/sdk v1.37.0 h1:ItB0QUqnjesGRvNcmAcU0LyvkVyGJ2xftD29bWdDvKI=
|
||||
go.opentelemetry.io/otel/sdk v1.37.0/go.mod h1:VredYzxUvuo2q3WRcDnKDjbdvmO0sCzOvVAiY+yUkAg=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0 h1:90lI228XrB9jCMuSdA0673aubgRobVZFhbjxHHspCPc=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0/go.mod h1:cNen4ZWfiD37l5NhS+Keb5RXVWZWpRE+9WyVCpbo5ps=
|
||||
go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4=
|
||||
go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0=
|
||||
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
||||
|
|
|
@ -32,7 +32,7 @@ require (
|
|||
go.opentelemetry.io/otel v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/log v0.13.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.36.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.37.0 // indirect
|
||||
go.uber.org/multierr v1.11.0 // indirect
|
||||
go.uber.org/zap v1.27.0 // indirect
|
||||
|
|
|
@ -67,10 +67,10 @@ go.opentelemetry.io/otel/log/logtest v0.13.0 h1:xxaIcgoEEtnwdgj6D6Uo9K/Dynz9jqIx
|
|||
go.opentelemetry.io/otel/log/logtest v0.13.0/go.mod h1:+OrkmsAH38b+ygyag1tLjSFMYiES5UHggzrtY1IIEA8=
|
||||
go.opentelemetry.io/otel/metric v1.37.0 h1:mvwbQS5m0tbmqML4NqK+e3aDiO02vsf/WgbsdpcPoZE=
|
||||
go.opentelemetry.io/otel/metric v1.37.0/go.mod h1:04wGrZurHYKOc+RKeye86GwKiTb9FKm1WHtO+4EVr2E=
|
||||
go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs=
|
||||
go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4=
|
||||
go.opentelemetry.io/otel/sdk v1.37.0 h1:ItB0QUqnjesGRvNcmAcU0LyvkVyGJ2xftD29bWdDvKI=
|
||||
go.opentelemetry.io/otel/sdk v1.37.0/go.mod h1:VredYzxUvuo2q3WRcDnKDjbdvmO0sCzOvVAiY+yUkAg=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0 h1:90lI228XrB9jCMuSdA0673aubgRobVZFhbjxHHspCPc=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0/go.mod h1:cNen4ZWfiD37l5NhS+Keb5RXVWZWpRE+9WyVCpbo5ps=
|
||||
go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4=
|
||||
go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0=
|
||||
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
||||
|
|
|
@ -29,7 +29,7 @@ require (
|
|||
go.opentelemetry.io/otel v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/log v0.13.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.36.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.37.0 // indirect
|
||||
go.uber.org/multierr v1.11.0 // indirect
|
||||
go.uber.org/zap v1.27.0 // indirect
|
||||
|
|
|
@ -53,10 +53,10 @@ go.opentelemetry.io/otel/log/logtest v0.13.0 h1:xxaIcgoEEtnwdgj6D6Uo9K/Dynz9jqIx
|
|||
go.opentelemetry.io/otel/log/logtest v0.13.0/go.mod h1:+OrkmsAH38b+ygyag1tLjSFMYiES5UHggzrtY1IIEA8=
|
||||
go.opentelemetry.io/otel/metric v1.37.0 h1:mvwbQS5m0tbmqML4NqK+e3aDiO02vsf/WgbsdpcPoZE=
|
||||
go.opentelemetry.io/otel/metric v1.37.0/go.mod h1:04wGrZurHYKOc+RKeye86GwKiTb9FKm1WHtO+4EVr2E=
|
||||
go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs=
|
||||
go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4=
|
||||
go.opentelemetry.io/otel/sdk v1.37.0 h1:ItB0QUqnjesGRvNcmAcU0LyvkVyGJ2xftD29bWdDvKI=
|
||||
go.opentelemetry.io/otel/sdk v1.37.0/go.mod h1:VredYzxUvuo2q3WRcDnKDjbdvmO0sCzOvVAiY+yUkAg=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0 h1:90lI228XrB9jCMuSdA0673aubgRobVZFhbjxHHspCPc=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0/go.mod h1:cNen4ZWfiD37l5NhS+Keb5RXVWZWpRE+9WyVCpbo5ps=
|
||||
go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4=
|
||||
go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0=
|
||||
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
||||
|
|
|
@ -30,8 +30,8 @@ require (
|
|||
go.opentelemetry.io/otel v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/log v0.13.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.36.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.37.0 // indirect
|
||||
go.uber.org/multierr v1.11.0 // indirect
|
||||
go.uber.org/zap v1.27.0 // indirect
|
||||
|
|
|
@ -53,10 +53,10 @@ go.opentelemetry.io/otel/log/logtest v0.13.0 h1:xxaIcgoEEtnwdgj6D6Uo9K/Dynz9jqIx
|
|||
go.opentelemetry.io/otel/log/logtest v0.13.0/go.mod h1:+OrkmsAH38b+ygyag1tLjSFMYiES5UHggzrtY1IIEA8=
|
||||
go.opentelemetry.io/otel/metric v1.37.0 h1:mvwbQS5m0tbmqML4NqK+e3aDiO02vsf/WgbsdpcPoZE=
|
||||
go.opentelemetry.io/otel/metric v1.37.0/go.mod h1:04wGrZurHYKOc+RKeye86GwKiTb9FKm1WHtO+4EVr2E=
|
||||
go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs=
|
||||
go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4=
|
||||
go.opentelemetry.io/otel/sdk v1.37.0 h1:ItB0QUqnjesGRvNcmAcU0LyvkVyGJ2xftD29bWdDvKI=
|
||||
go.opentelemetry.io/otel/sdk v1.37.0/go.mod h1:VredYzxUvuo2q3WRcDnKDjbdvmO0sCzOvVAiY+yUkAg=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0 h1:90lI228XrB9jCMuSdA0673aubgRobVZFhbjxHHspCPc=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0/go.mod h1:cNen4ZWfiD37l5NhS+Keb5RXVWZWpRE+9WyVCpbo5ps=
|
||||
go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4=
|
||||
go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0=
|
||||
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
||||
|
|
|
@ -27,7 +27,7 @@ require (
|
|||
go.opentelemetry.io/otel v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/log v0.13.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.36.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.37.0 // indirect
|
||||
go.uber.org/multierr v1.11.0 // indirect
|
||||
go.uber.org/zap v1.27.0 // indirect
|
||||
|
|
|
@ -53,10 +53,10 @@ go.opentelemetry.io/otel/log/logtest v0.13.0 h1:xxaIcgoEEtnwdgj6D6Uo9K/Dynz9jqIx
|
|||
go.opentelemetry.io/otel/log/logtest v0.13.0/go.mod h1:+OrkmsAH38b+ygyag1tLjSFMYiES5UHggzrtY1IIEA8=
|
||||
go.opentelemetry.io/otel/metric v1.37.0 h1:mvwbQS5m0tbmqML4NqK+e3aDiO02vsf/WgbsdpcPoZE=
|
||||
go.opentelemetry.io/otel/metric v1.37.0/go.mod h1:04wGrZurHYKOc+RKeye86GwKiTb9FKm1WHtO+4EVr2E=
|
||||
go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs=
|
||||
go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4=
|
||||
go.opentelemetry.io/otel/sdk v1.37.0 h1:ItB0QUqnjesGRvNcmAcU0LyvkVyGJ2xftD29bWdDvKI=
|
||||
go.opentelemetry.io/otel/sdk v1.37.0/go.mod h1:VredYzxUvuo2q3WRcDnKDjbdvmO0sCzOvVAiY+yUkAg=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0 h1:90lI228XrB9jCMuSdA0673aubgRobVZFhbjxHHspCPc=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0/go.mod h1:cNen4ZWfiD37l5NhS+Keb5RXVWZWpRE+9WyVCpbo5ps=
|
||||
go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4=
|
||||
go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0=
|
||||
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
||||
|
|
|
@ -48,8 +48,8 @@ require (
|
|||
go.opentelemetry.io/otel v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/log v0.13.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.36.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.37.0 // indirect
|
||||
go.uber.org/multierr v1.11.0 // indirect
|
||||
go.yaml.in/yaml/v3 v3.0.4 // indirect
|
||||
|
|
|
@ -84,10 +84,10 @@ go.opentelemetry.io/otel/log/logtest v0.13.0 h1:xxaIcgoEEtnwdgj6D6Uo9K/Dynz9jqIx
|
|||
go.opentelemetry.io/otel/log/logtest v0.13.0/go.mod h1:+OrkmsAH38b+ygyag1tLjSFMYiES5UHggzrtY1IIEA8=
|
||||
go.opentelemetry.io/otel/metric v1.37.0 h1:mvwbQS5m0tbmqML4NqK+e3aDiO02vsf/WgbsdpcPoZE=
|
||||
go.opentelemetry.io/otel/metric v1.37.0/go.mod h1:04wGrZurHYKOc+RKeye86GwKiTb9FKm1WHtO+4EVr2E=
|
||||
go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs=
|
||||
go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4=
|
||||
go.opentelemetry.io/otel/sdk v1.37.0 h1:ItB0QUqnjesGRvNcmAcU0LyvkVyGJ2xftD29bWdDvKI=
|
||||
go.opentelemetry.io/otel/sdk v1.37.0/go.mod h1:VredYzxUvuo2q3WRcDnKDjbdvmO0sCzOvVAiY+yUkAg=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0 h1:90lI228XrB9jCMuSdA0673aubgRobVZFhbjxHHspCPc=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0/go.mod h1:cNen4ZWfiD37l5NhS+Keb5RXVWZWpRE+9WyVCpbo5ps=
|
||||
go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4=
|
||||
go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0=
|
||||
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
||||
|
|
|
@ -24,7 +24,7 @@ require (
|
|||
go.opentelemetry.io/otel v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/log v0.13.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.36.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.37.0 // indirect
|
||||
go.uber.org/multierr v1.11.0 // indirect
|
||||
go.uber.org/zap v1.27.0 // indirect
|
||||
|
|
|
@ -47,10 +47,10 @@ go.opentelemetry.io/otel/log/logtest v0.13.0 h1:xxaIcgoEEtnwdgj6D6Uo9K/Dynz9jqIx
|
|||
go.opentelemetry.io/otel/log/logtest v0.13.0/go.mod h1:+OrkmsAH38b+ygyag1tLjSFMYiES5UHggzrtY1IIEA8=
|
||||
go.opentelemetry.io/otel/metric v1.37.0 h1:mvwbQS5m0tbmqML4NqK+e3aDiO02vsf/WgbsdpcPoZE=
|
||||
go.opentelemetry.io/otel/metric v1.37.0/go.mod h1:04wGrZurHYKOc+RKeye86GwKiTb9FKm1WHtO+4EVr2E=
|
||||
go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs=
|
||||
go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4=
|
||||
go.opentelemetry.io/otel/sdk v1.37.0 h1:ItB0QUqnjesGRvNcmAcU0LyvkVyGJ2xftD29bWdDvKI=
|
||||
go.opentelemetry.io/otel/sdk v1.37.0/go.mod h1:VredYzxUvuo2q3WRcDnKDjbdvmO0sCzOvVAiY+yUkAg=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0 h1:90lI228XrB9jCMuSdA0673aubgRobVZFhbjxHHspCPc=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0/go.mod h1:cNen4ZWfiD37l5NhS+Keb5RXVWZWpRE+9WyVCpbo5ps=
|
||||
go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4=
|
||||
go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0=
|
||||
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
||||
|
|
|
@ -129,3 +129,5 @@ replace go.opentelemetry.io/collector/extension/extensionmiddleware => ../extens
|
|||
replace go.opentelemetry.io/collector/config/configmiddleware => ../../config/configmiddleware
|
||||
|
||||
replace go.opentelemetry.io/collector/extension/extensionmiddleware/extensionmiddlewaretest => ../extensionmiddleware/extensionmiddlewaretest
|
||||
|
||||
replace go.opentelemetry.io/collector/confmap/xconfmap => ../../confmap/xconfmap
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
module go.opentelemetry.io/collector/internal/cmd/pdatagen
|
||||
|
||||
go 1.23.0
|
||||
|
||||
require github.com/ettle/strcase v0.2.0
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
github.com/ettle/strcase v0.2.0 h1:fGNiVF21fHXpX1niBgk0aROov1LagYsOwV/xqKDKR/Q=
|
||||
github.com/ettle/strcase v0.2.0/go.mod h1:DajmHElDSaX76ITe3/VHVyMin4LWSJN5Z909Wp+ED1A=
|
|
@ -98,6 +98,7 @@ func (ss *sliceOfValues) templateFields(packageInfo *PackageInfo) map[string]any
|
|||
state := stateAccessor(ss.packageName)
|
||||
return map[string]any{
|
||||
"type": "sliceOfValues",
|
||||
"isCommon": usedByOtherDataTypes(ss.packageName),
|
||||
"structName": ss.getName(),
|
||||
"elementName": ss.element.getName(),
|
||||
"originName": ss.element.originFullName,
|
||||
|
@ -117,4 +118,4 @@ func (ss *sliceOfValues) generateInternal(packageInfo *PackageInfo) []byte {
|
|||
return []byte(executeTemplate(sliceInternalTemplate, ss.templateFields(packageInfo)))
|
||||
}
|
||||
|
||||
var _ baseStruct = (*sliceOfValues)(nil)
|
||||
var _ baseSlice = (*sliceOfValues)(nil)
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue