Skip to content

RFC: Use AppConfig Extension in Parameters module #827

@jeromevdl

Description

@jeromevdl

Key information

  • RFC PR: (leave this empty)
  • Related issue(s), if known:
  • Area: (i.e. Tracer, Metrics, Logger, etc.) Parameters
  • Meet tenets: (Yes/no) that's a question

Summary

Add integration with AppConfig through the AppConfig Extension.

Motivation

The parameters module in Powertools for Java does not provide AppConfig integration. This integration can be achieved in two ways:

This RFC is about letting the developer choose his preferred option, and thus implement the two.

Proposal

  • Detect the presence of the extension (automatically, or with an environment variable set to true).
  • Get config from the extension: http://localhost:2772/applications/%s/environments/%s/configurations/%s
  • Developer must add the extension layer to his function.

This proposal has been drafted in #826 (code here)

Drawbacks

  • Need an additional layer (which is limited in each function)
  • The extension already provides the cache mechanism which is also implemented in Parameters.
  • Increase the size of the package : extension + SDK (unless we could avoid adding the SDK when using the extension)

Rationale and alternatives

N/A

Unresolved questions

Detect the presence of the extension (properly), rather than using an environment variable. Pinging the extension endpoint, or looking at /opt/extensions directory. But it slows down the overall execution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions