Skip to content

[connector/servicegraph] Simplify servicegraph connector config arguments#45399

Draft
ptodev wants to merge 4 commits into
open-telemetry:mainfrom
ptodev:simplify-defaults
Draft

[connector/servicegraph] Simplify servicegraph connector config arguments#45399
ptodev wants to merge 4 commits into
open-telemetry:mainfrom
ptodev:simplify-defaults

Conversation

@ptodev
Copy link
Copy Markdown
Contributor

@ptodev ptodev commented Jan 13, 2026

Description

Some config arguments are not being set in the createDefaultConfig() function, which could create problems for utilities which attempt to infer the default arguments of an OTel Collector component.

Testing

Do I need to add more tests?

@ptodev ptodev requested a review from a team as a code owner January 13, 2026 17:19
@ptodev ptodev requested a review from mwear January 13, 2026 17:19
@github-actions github-actions Bot requested review from JaredTan95 and mapno January 13, 2026 17:19
Comment on lines +86 to +92
if c.StoreExpirationLoop <= 0 {
return errors.New("`store_expiration_loop` must be positive")
}

if c.CacheLoop <= 0 {
return errors.New("`cache_loop` must be positive")
}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not backwards compatible. Should we log a warning instead?

Comment thread connector/servicegraphconnector/config.go
@atoulme
Copy link
Copy Markdown
Contributor

atoulme commented Feb 23, 2026

Please add a changelog.

Comment on lines -50 to -54
defaultPeerAttributes = []string{
string(conventions.PeerServiceKey), string(conventionsv125.DBNameKey), string(conventionsv128.DBSystemKey),
}

defaultDatabaseNameAttributes = []string{string(conventionsv125.DBNameKey)}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI in factory.go this has been changed to only use semconv v1.25.0 and the keys remain the same, so this is backwards compatible.

@ptodev
Copy link
Copy Markdown
Contributor Author

ptodev commented Feb 25, 2026

@atoulme I did not add a changelog entry because this change as a whole is not user facing. The only user facing bit is that StoreExpirationLoop and CacheLoop are now required to be positive. This would be a breaking change and I'm not sure if it's acceptable. I'm waiting for @mapno's feedback on this. If we go ahead with the breaking change I'll add a changelog entry, but if we don't then I don't think we need a changelog entry.

@github-actions
Copy link
Copy Markdown
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions Bot added the Stale label Mar 12, 2026
@ptodev ptodev force-pushed the simplify-defaults branch from 3df91ec to 4b3d1f8 Compare March 18, 2026 12:09
@ptodev
Copy link
Copy Markdown
Contributor Author

ptodev commented Mar 18, 2026

Hi @mwear, @JaredTan95 👋 Does this PR look ok to you?

@github-actions github-actions Bot removed the Stale label Mar 19, 2026
@ptodev
Copy link
Copy Markdown
Contributor Author

ptodev commented Mar 30, 2026

Hi @mwear, @JaredTan95, @braydonk, would you mind taking a look please?

@github-actions
Copy link
Copy Markdown
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions Bot added the Stale label Apr 14, 2026
@atoulme
Copy link
Copy Markdown
Contributor

atoulme commented Apr 24, 2026

Please resolve conflicts, add a changelog and check the build, then mark ready for review again.

@atoulme atoulme marked this pull request as draft April 24, 2026 00:49
@github-actions github-actions Bot removed the Stale label Apr 24, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 9, 2026

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions Bot added the Stale label May 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants