GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add DeclarativeConfigContext by jack-berg · Pull Request #7293 · open-telemetry/opentelemetry-java

Conversation

@jack-berg

@jack-berg jack-berg commented Apr 22, 2025

Copy link
Copy Markdown
Member

Refactor declarative config to encapsulate config context and state into a new carrier object, DeclarativeConfigContext.

Benefits:

  • Cleans up Factory interface by reducing number of arguments
  • Makes it easier to test because SPI loading and closeables tracking is encapsulated in an instance which can be mocked and spied. Previously these were managed via static helper methods.
  • Abstracts SPI loading to a single place, making Move declarative config to permanent home #7292 easier
  • ~200 fewer lines of code

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@jack-berg
Add DeclarativeConfigContext
1a8baf3
@jack-berg
jack-berg requested a review from a team as a code owner April 22, 2025 21:32
@codecov

codecov Bot commented Apr 22, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 91.26214% with 9 lines in your changes missing coverage. Please review.

Project coverage is 89.86%. Comparing base (b468a2e) to head (11c7098).
Report is 19 commits behind head on main.

Files with missing lines Patch % Lines
...incubator/fileconfig/DeclarativeConfigContext.java 70.96% 8 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #7293      +/-   ##
============================================
- Coverage     90.04%   89.86%   -0.19%     
+ Complexity     6916     6890      -26     
============================================
  Files           787      786       -1     
  Lines         20864    20771      -93     
  Branches       2023     2024       +1     
============================================
- Hits          18788    18666     -122     
- Misses         1439     1463      +24     
- Partials        637      642       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

jaydeluca
jaydeluca approved these changes May 3, 2025
View reviewed changes
Comment thread .../main/java/io/opentelemetry/sdk/extension/incubator/fileconfig/DeclarativeConfigContext.java Outdated
}

/**
* Find a registered {@link ComponentProvider} which {@link ComponentProvider#getType()} matching

@jaydeluca jaydeluca Apr 25, 2025

Copy link
Copy Markdown
Member

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.

Suggested change
* Find a registered {@link ComponentProvider} which {@link ComponentProvider#getType()} matching
* Find a registered {@link ComponentProvider} with {@link ComponentProvider#getType()} matching

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
trask
trask approved these changes May 6, 2025
View reviewed changes
@jack-berg
fix typo in javadoc
11c7098
@jack-berg
jack-berg merged commit eec2120 into open-telemetry:main May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@trask trask trask approved these changes
@jaydeluca jaydeluca jaydeluca approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@jack-berg @trask @jaydeluca
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.