Skip to content

Move config parsing and CRD metrics from apis to internal package#4989

Merged
swiatekm merged 9 commits into
open-telemetry:mainfrom
iypetrov:move-otelconfig-and-metrics-to-internal
May 13, 2026
Merged

Move config parsing and CRD metrics from apis to internal package#4989
swiatekm merged 9 commits into
open-telemetry:mainfrom
iypetrov:move-otelconfig-and-metrics-to-internal

Conversation

@iypetrov
Copy link
Copy Markdown
Contributor

@iypetrov iypetrov commented Apr 23, 2026

Description:
This a prerequisite for issue #4972, as mention in this comment.

Link to tracking Issue(s):

Testing:
No new tests are added, just adapt some of the existing ones.

Breaking changes:

  • Methods on *Config (package apis/v1beta1) converted to standalone functions in internal/otelconfig, now taking *v1beta1.Config as the first parameter:
    • GetEnabledComponents, GetReceiverPorts, GetExporterPorts, GetExtensionPorts, GetReceiverAndExporterPorts, GetAllPorts, GetEnvironmentVariables, GetAllRbacRules, ApplyDefaults, GetLivenessProbe, GetReadinessProbe, GetStartupProbe, Yaml, NullObjects
  • Methods on *Service converted to functions in internal/otelconfig:
    • MetricsEndpoint, GetTelemetry
    • ApplyDefaults → renamed to ServiceApplyDefaults
  • Method on *Telemetry converted to function:
    • ToAnyConfig → renamed to TelemetryToAnyConfig
  • Functions moved from apis/v1beta1 to internal/metrics with renames:
    • BootstrapMetrics → Bootstrap
    • NewMetrics(prv, ctx, cl) → New(ctx, prv, cl) (parameter reorder: ctx now first)
  • Types moved out of apis/v1beta1:
    • MetricsConfig, Telemetry → internal/otelconfig
    • Metrics → internal/metrics

@iypetrov iypetrov changed the title Move otelconfig and metrics to internal Move config parsing and CRD metrics from apis to internal package Apr 23, 2026
@iypetrov iypetrov marked this pull request as ready for review April 24, 2026 11:54
@iypetrov iypetrov requested a review from a team as a code owner April 24, 2026 11:54
@iypetrov iypetrov force-pushed the move-otelconfig-and-metrics-to-internal branch 2 times, most recently from 85fdcdf to 3fc7a48 Compare May 7, 2026 05:25
@swiatekm swiatekm added the Skip Changelog PRs that do not require a CHANGELOG.md entry label May 7, 2026
@swiatekm
Copy link
Copy Markdown
Contributor

swiatekm commented May 7, 2026

@iypetrov this looks good to me, could you fix the lint errors?

iypetrov added 5 commits May 7, 2026 14:45
Signed-off-by: Ilia Petrov <ilia.yavorov.petrov@gmail.com>
Signed-off-by: Ilia Petrov <ilia.yavorov.petrov@gmail.com>
Signed-off-by: Ilia Petrov <ilia.yavorov.petrov@gmail.com>
Signed-off-by: Ilia Petrov <ilia.yavorov.petrov@gmail.com>
Signed-off-by: Ilia Petrov <ilia.yavorov.petrov@gmail.com>
@iypetrov iypetrov force-pushed the move-otelconfig-and-metrics-to-internal branch from ad22886 to 178d5cd Compare May 7, 2026 11:45
@swiatekm
Copy link
Copy Markdown
Contributor

swiatekm commented May 7, 2026

Since we're removing symbols from a public package, I think we should add a changelog entry labeling it as breaking. We could move these to a public package, but I'd rather wait and see if anyone complains. WDYT @open-telemetry/operator-maintainers ?

@jaronoff97
Copy link
Copy Markdown
Contributor

yes, i agree we should definitely mark this breaking, i don't imagine anyone is depending on this, but we should call that out explicitly

@iypetrov
Copy link
Copy Markdown
Contributor Author

yes, i agree we should definitely mark this breaking, i don't imagine anyone is depending on this, but we should call that out explicitly

I updated the PR description so to include breaking changes, is that enough?

@iypetrov iypetrov requested a review from pavolloffay May 10, 2026 20:20
@swiatekm
Copy link
Copy Markdown
Contributor

@iypetrov you need to add a changelog entry. Run make chlog-new and fill in the template it creates.

@swiatekm swiatekm removed the Skip Changelog PRs that do not require a CHANGELOG.md entry label May 10, 2026
Signed-off-by: Ilia Petrov <ilia.yavorov.petrov@gmail.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 11, 2026

E2E Test Results

 36 files  259 suites   2h 18m 2s ⏱️
109 tests 109 ✅ 0 💤 0 ❌
281 runs  281 ✅ 0 💤 0 ❌

Results for commit 95dfe09.

♻️ This comment has been updated with latest results.

@iypetrov
Copy link
Copy Markdown
Contributor Author

hey @swiatekm, do you think this one is ready to be merged?

@swiatekm swiatekm merged commit fc24d14 into open-telemetry:main May 13, 2026
55 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants