Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Facilitate subclassing of MetricsLogger #148

Open
ajpower opened this issue Mar 22, 2023 · 0 comments
Open

Facilitate subclassing of MetricsLogger #148

ajpower opened this issue Mar 22, 2023 · 0 comments

Comments

@ajpower
Copy link

ajpower commented Mar 22, 2023

Context

Our team wants to subclass MetricsLogger to track which metrics properties are being set. However, we are facing two issues that are preventing us from doing so:

  1. The context property is private. This requires us to manually track the properties that have been set through setProperty.
  2. MetricsLogger's constructor requires parameters whose types are defined in internal modules, which makes it difficult to define a constructor of our own in the subclass.

Ask

Our request is to make MetricsLogger more amenable to subclassing. Specifically, we would like to

  1. Make MetricsLogger.context a protected property
  2. Export resolveEnvironment and MetricsContext in the index.js as part of aws-embedded-metrics-node's public API.

I am happy to submit a PR if our request is approved.

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

No branches or pull requests

1 participant