-
Notifications
You must be signed in to change notification settings - Fork 212
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
Bump otel dependencies to v0.115.0/v1.21.0 #1485
base: main
Are you sure you want to change the base?
Conversation
73b1131
to
d61236c
Compare
d61236c
to
f2ac15b
Compare
This PR was marked stale due to lack of activity. |
@@ -135,7 +134,6 @@ func Factories() (otelcol.Factories, error) { | |||
awsproxy.NewFactory(), | |||
entitystore.NewFactory(), | |||
server.NewFactory(), | |||
ballastextension.NewFactory(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this no longer exist anymore with the upgrade? Seems odd -- I assume customers could be using this as part of their adot config?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah it was deprecated in v0.92.0 of open-telemetry-collector-contrib and then completely removed in v0.108.0. It was added for adot parity. confirmed with @jefchien we should be able to remove it
@@ -22,7 +22,11 @@ exporters: | |||
enabled: false | |||
http2_ping_timeout: 0s | |||
http2_read_idle_timeout: 0s | |||
idle_conn_timeout: 1m30s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems like the default is 30s, why is this 1m30s?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the values come from http.DefaultTransport
which is 90s: https://github.com/golang/go/blob/master/src/net/http/transport.go#L53. Here's the commit where this was changed: open-telemetry/opentelemetry-collector@4d0b088
@@ -28,7 +28,11 @@ exporters: | |||
enabled: false | |||
http2_ping_timeout: 0s | |||
http2_read_idle_timeout: 0s | |||
idle_conn_timeout: 1m30s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this the default? I presume this shouldn't break anything
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is the default, yeah. Upstream is being more explicit about setting the clientConfig default values to http.DefaultTransport which shows up in our config files. See open-telemetry/opentelemetry-collector@4d0b088
pr build is failing |
@@ -134,6 +134,7 @@ jobs: | |||
- uses: actions/checkout@v3 | |||
with: | |||
repository: ${{env.CWA_GITHUB_TEST_REPO_NAME}} | |||
ref: ab30cf84d0254506c92502ce185d25dd72701c81 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC correctly, there was a problem with the main branch of the test repo and I needed to pull a specific commit to get the tests to run. I can undo this
) | ||
|
||
replace github.com/amazon-contributing/opentelemetry-collector-contrib/extension/awsmiddleware => github.com/amazon-contributing/opentelemetry-collector-contrib/extension/awsmiddleware v0.0.0-20250207173954-4e1c56b92f1e |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: This can just be in the dependency block. There's nothing to replace since v0.115.0 of the middleware extension doesn't exist.
github.com/gin-gonic/gin v1.10.0 | ||
github.com/go-kit/log v0.2.1 | ||
github.com/go-playground/validator/v10 v10.20.0 | ||
github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31 | ||
github.com/gobwas/glob v0.2.3 | ||
github.com/google/go-cmp v0.6.0 | ||
github.com/google/uuid v1.6.0 | ||
github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd // indirect | ||
github.com/grafana/regexp v0.0.0-20240518133315-a468a5bfb3bc // indirect |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Move to indirect block.
@@ -62,11 +63,10 @@ func (a Adapter) createMetricsReceiver(ctx context.Context, settings receiver.Cr | |||
|
|||
rcvr := newAdaptedReceiver(input, ctx, consumer, settings.Logger) | |||
|
|||
scraper, err := scraperhelper.NewScraper( | |||
settings.ID.Type().String(), | |||
scraper, err := scraper.NewMetrics( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: scraper variable shadows scraper package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch
@@ -47,7 +47,7 @@ func TestComponents(t *testing.T) { | |||
"cumulativetodelta", | |||
"deltatorate", | |||
"ec2tagger", | |||
"experimental_metricsgeneration", | |||
"metricsgeneration", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice that it's no longer experimental
traces: | ||
level: Basic |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we change the translator so this is None?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I'll take a look at that
@@ -294,7 +294,7 @@ extensions: | |||
certificate_file_path: "" | |||
dialer: | |||
timeout: 0s | |||
endpoint: 0.0.0.0:2000 | |||
endpoint: localhost:2000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should not have changed. We'll need to set a default in the configuration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok
Receivers TranslatorMap[component.Config, component.ID] | ||
Processors TranslatorMap[component.Config, component.ID] | ||
Exporters TranslatorMap[component.Config, component.ID] | ||
Extensions TranslatorMap[component.Config, component.ID] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Could all be ComponentTranslatorMap
s.
type ID interface { | ||
String() string | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: This is the exact same interface as fmt.Stringer
. Just use that instead.
return t.list.Len() | ||
} | ||
|
||
// NewTranslatorMap creates a TranslatorMap from the translators. | ||
func NewTranslatorMap[C any](translators ...Translator[C]) TranslatorMap[C] { | ||
t := translatorMap[C]{ | ||
func NewTranslatorMap[C any, ID TranslatorID](translators ...Translator[C, ID]) translatorMap[C, ID] { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
func NewTranslatorMap[C any, ID TranslatorID](translators ...Translator[C, ID]) translatorMap[C, ID] { | |
func NewTranslatorMap[C any, ID TranslatorID](translators ...Translator[C, ID]) TranslatorMap[C, ID] { |
|
||
func NewTranslatorWithStatusCode(name component.DataType, operations []string, isStatusCodeEnabled bool) common.Translator[component.Config] { | ||
func NewTranslatorWithStatusCode(name Name, operations []string, isStatusCodeEnabled bool) common.ComponentTranslator { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why can't we just pass in the equivalent of the component.DataType
, which in this case would be pipeline.Signal
?
MetricsName = Name(pipeline.SignalMetrics.String()) | ||
LogsName = Name(pipeline.SignalLogs.String()) | ||
TracesName = Name(pipeline.SignalTraces.String()) | ||
StatusCodeName = Name("statuscode") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this for?
} | ||
|
||
// ComponentTranslator is a translator that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Incomplete comment
type ComponentTranslator = Translator[component.Config, component.ID] | ||
type ComponentTranslatorMap = TranslatorMap[component.Config, component.ID] | ||
type PipelineTranslator = Translator[*ComponentTranslators, pipeline.ID] | ||
type PipelineTranslatorMap = TranslatorMap[*ComponentTranslators, pipeline.ID] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could likely add convenience functions for NewTranslatorMap
as well.
Description of the issue
We need to track and pull in changes from upstream periodically.
Major changes to lookout for:
pipelines.Config
now requires apipelines.ID
rather thancomponent.ID
level: Basic
to basically all the expected yaml files“true”
forlocal_mode
setting. Must betrue
[]
forexternal_labels
setting. Must be{}
clientConfig
Description of changes
Merge OTel contrib v0.115.0/v1.21.0. Previous version was v0.103.0
License
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Tests
Requirements
Before commit the code, please do the following steps.
make fmt
andmake fmt-sh
make lint