Skip to content

A few proposals#1

Closed
jack-berg wants to merge 1 commit into
jackshirazi:config-provider-callbackfrom
jack-berg:config-provider-callback
Closed

A few proposals#1
jack-berg wants to merge 1 commit into
jackshirazi:config-provider-callbackfrom
jack-berg:config-provider-callback

Conversation

@jack-berg

Copy link
Copy Markdown

Summary:

  • Removed updateConfig and setConfigProperty — mutation belongs on the SDK implementation, not the API, analogous to how SdkTracerProvider.shutdown() doesn't appear on TracerProvider
  • updateConfig and setConfigProperty consolidated into a single setConfig(String path, Object value) — the path includes the key as its final segment, so callers no longer split path from key; accepts String, Boolean, Long, Double, Integer, DeclarativeConfigProperties, or a List thereof; validates that the type of an existing value does not change
  • Replaced AtomicReference CAS loops with synchronized(lock) covering both mutation and notification dispatch, fixing out-of-order notification delivery under concurrent writers; openTelemetryConfigModel downgraded to volatile since reads remain lock-free
  • shutdown() and ListenerRegistration simplified — the lock eliminates the need to iterate-and-close individual registrations on shutdown, the double-check pattern in addConfigChangeListener, and the AtomicBoolean closed guard on registrations

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.

1 participant