Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update config dependency #11611

Open
wants to merge 30 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
d76f34b
update MetricExporter to PullMetricExporter in various tests
codeboten Oct 23, 2024
fd0e9f6
update attributes func to return slice of AttributeNameValue
codeboten Oct 23, 2024
878580e
update factory to pass in context
codeboten Oct 23, 2024
da04535
remove otelinit
codeboten Oct 25, 2024
dfdb306
update metrics test
codeboten Oct 25, 2024
284b4fa
set meter provider config in SDK initialization
codeboten Oct 30, 2024
a0ba9ff
fix test utility to return a valid ipv6 address and prom configuration
codeboten Nov 3, 2024
50c047b
fix attributes test
codeboten Nov 3, 2024
f5ba523
move code to disable high cardinality to use views in service
codeboten Nov 3, 2024
ab5ace1
add changelog
codeboten Nov 5, 2024
a988588
ensure metric level none disables metric readers
codeboten Nov 5, 2024
c7b6ce6
ensure the sdk is shutdown on error
codeboten Nov 6, 2024
6f41b4a
fix service_test
codeboten Nov 6, 2024
28afb8d
add migration from v0.2.0 to v0.3.0 support
codeboten Dec 10, 2024
bff96d6
add alias
codeboten Dec 11, 2024
ccc4470
add v0.3.0 tests
codeboten Dec 11, 2024
c7d1ed6
update imports
codeboten Dec 11, 2024
9dabf0f
fix additional imports
codeboten Dec 11, 2024
3936158
fix package statements
codeboten Dec 11, 2024
539948d
update test to reflect error message
codeboten Dec 16, 2024
724fb72
ignore AdditionalProperties when checking struct field tags
codeboten Dec 16, 2024
d186a44
tidy
codeboten Jan 17, 2025
92edfd8
fix lint
codeboten Dec 17, 2024
ab33a92
revert change to remove toolchain in otelcorecol go.mod
codeboten Jan 17, 2025
6982455
crosslink
codeboten Jan 20, 2025
f36069b
tidy
codeboten Jan 20, 2025
d742afd
fix test
codeboten Jan 22, 2025
c5ca4ea
more lint
codeboten Jan 22, 2025
7220af9
Merge branch 'main' into codeboten/update-config-dependency
codeboten Jan 23, 2025
055d800
Merge branch 'main' into codeboten/update-config-dependency
codeboten Jan 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .chloggen/codeboten_update-config-dependency.yaml
Original file line number Diff line number Diff line change
@@ -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: service

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: remove custom code and instead use config package to instantiate meter provider.

# One or more tracking issues or pull requests related to the change
issues: [11611]

# (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: []
17 changes: 9 additions & 8 deletions cmd/otelcorecol/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -123,26 +123,27 @@ require (
go.opentelemetry.io/collector/semconv v0.118.0 // indirect
go.opentelemetry.io/collector/service v0.118.0 // indirect
go.opentelemetry.io/contrib/bridges/otelzap v0.9.0 // indirect
go.opentelemetry.io/contrib/config v0.10.0 // indirect
go.opentelemetry.io/contrib/config v0.14.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.59.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.59.0 // indirect
go.opentelemetry.io/contrib/propagators/b3 v1.34.0 // indirect
go.opentelemetry.io/contrib/zpages v0.59.0 // indirect
go.opentelemetry.io/otel v1.34.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.7.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.10.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.10.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.34.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.34.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.31.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.31.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.31.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.34.0 // indirect
go.opentelemetry.io/otel/exporters/prometheus v0.56.0 // indirect
go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.7.0 // indirect
go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.10.0 // indirect
go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.34.0 // indirect
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.31.0 // indirect
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.34.0 // indirect
go.opentelemetry.io/otel/log v0.10.0 // indirect
go.opentelemetry.io/otel/metric v1.34.0 // indirect
go.opentelemetry.io/otel/sdk v1.34.0 // indirect
go.opentelemetry.io/otel/sdk/log v0.7.0 // indirect
go.opentelemetry.io/otel/sdk/log v0.10.0 // indirect
go.opentelemetry.io/otel/sdk/metric v1.34.0 // indirect
go.opentelemetry.io/otel/trace v1.34.0 // indirect
go.opentelemetry.io/proto/otlp v1.5.0 // indirect
Expand Down
34 changes: 18 additions & 16 deletions cmd/otelcorecol/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions component/componenttest/configtest.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ func checkStructFieldTags(f reflect.StructField) error {
default:
fieldTag := tagParts[0]
if !configFieldTagRegExp.MatchString(fieldTag) {
if f.Name == "AdditionalProperties" {
return nil
}
return fmt.Errorf(
"field %q has config tag %q which doesn't satisfy %q",
f.Name,
Expand Down
17 changes: 9 additions & 8 deletions internal/e2e/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -102,25 +102,26 @@ require (
go.opentelemetry.io/collector/receiver/xreceiver v0.118.0 // indirect
go.opentelemetry.io/collector/semconv v0.118.0 // indirect
go.opentelemetry.io/contrib/bridges/otelzap v0.9.0 // indirect
go.opentelemetry.io/contrib/config v0.10.0 // indirect
go.opentelemetry.io/contrib/config v0.14.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.59.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.59.0 // indirect
go.opentelemetry.io/contrib/propagators/b3 v1.34.0 // indirect
go.opentelemetry.io/otel v1.34.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.7.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.10.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.10.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.34.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.34.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.31.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.31.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.31.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.34.0 // indirect
go.opentelemetry.io/otel/exporters/prometheus v0.56.0 // indirect
go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.7.0 // indirect
go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.10.0 // indirect
go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.34.0 // indirect
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.31.0 // indirect
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.34.0 // indirect
go.opentelemetry.io/otel/log v0.10.0 // indirect
go.opentelemetry.io/otel/metric v1.34.0 // indirect
go.opentelemetry.io/otel/sdk v1.34.0 // indirect
go.opentelemetry.io/otel/sdk/log v0.7.0 // indirect
go.opentelemetry.io/otel/sdk/log v0.10.0 // indirect
go.opentelemetry.io/otel/sdk/metric v1.34.0 // indirect
go.opentelemetry.io/otel/trace v1.34.0 // indirect
go.opentelemetry.io/proto/otlp v1.5.0 // indirect
Expand Down
34 changes: 18 additions & 16 deletions internal/e2e/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions otelcol/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"testing"

"github.com/stretchr/testify/assert"
"go.opentelemetry.io/contrib/config"
config "go.opentelemetry.io/contrib/config/v0.3.0"
"go.uber.org/zap/zapcore"

"go.opentelemetry.io/collector/component"
Expand Down Expand Up @@ -279,7 +279,7 @@ func generateConfig() *Config {
Level: configtelemetry.LevelNormal,
Readers: []config.MetricReader{
{
Pull: &config.PullMetricReader{Exporter: config.MetricExporter{
Pull: &config.PullMetricReader{Exporter: config.PullMetricExporter{
Prometheus: &config.Prometheus{
Host: newPtr("localhost"),
Port: newPtr(8080),
Expand Down
Loading
Loading