Skip to content

Discuss migrating dynamic-control from ConfigProperties to DeclarativeConfigProperties #2989

Description

@zeitlinger

Summary

dynamic-control still uses ConfigProperties internally in a few places, and a follow-up idea was to replace those usages with DeclarativeConfigProperties.

That needs design discussion first.

Why discuss first

A key concern is that the current TelemetryPolicySamplerComponentProvider path uses SystemPropertyFallbackConfigProperties, which manually reads from system properties / env vars.

That is important because it violates the spirit of dynamic-control's declarative config path: when dynamic-control is configured through declarative config, we should be very clear whether it is supposed to honor only the declarative config model, or whether it is also allowed to reach out to unrelated system properties / env vars on its own.

A naive migration away from ConfigProperties risks either:

  • preserving behavior that we may not actually want to preserve, or
  • accidentally changing behavior without first agreeing what the intended behavior should be.

So before changing dynamic-control to use DeclarativeConfigProperties throughout, we should clarify:

  • whether dynamic-control should manually read system properties / env vars at all in declarative-config mode
  • which config in dynamic-control is intentionally declarative-only
  • whether any fallback semantics are intentional, accidental, or need to be split by use case
  • what the desired API shape is for sources/providers such as OpampPolicyProvider

Scope candidates

Potential follow-up work after agreement:

  • TelemetryPolicySamplerComponentProvider
  • PolicyInit
  • SourceKind
  • OpampPolicyProvider
  • related tests

Context

This came up while reducing deprecated DeclarativeConfigPropertiesBridgeBuilder usage in:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions