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

Should the in-memory exporter be a pull metric exporter? #2425

Open
alanwest opened this issue Mar 18, 2022 · 3 comments
Open

Should the in-memory exporter be a pull metric exporter? #2425

alanwest opened this issue Mar 18, 2022 · 3 comments
Assignees
Labels
area:sdk Related to the SDK spec:metrics Related to the specification/metrics directory

Comments

@alanwest
Copy link
Member

Currently, the spec considers the in-memory exporter a push metric exporter:

In-memory Metrics Exporter is a Push Metric Exporter which accumulates metrics data in the local memory and allows to inspect it (useful for e.g. unit tests).

The original intent of #2415 was to define a default interval to push metrics from a periodic metric reader paired with the in-memory exporter. The interval I proposed was infinite - that is, by default, an explicit force flush would be required to collect metrics. This raised the question of whether the in-memory exporter is actually a pull metric exporter.

An argument was offered in favor of leaving it as a push exporter #2415 (comment).

A number of folks felt that providing it as pull metric exporter offers better ergonomics for the primary use case which is unit tests. One suggestion (#2415 (comment)) is that both push and pull may be valuable.

@aabmass
Copy link
Member

aabmass commented Mar 18, 2022

I like the suggestion that we don't specify if its push or pull which @alanwest mentioned.

@alanwest
Copy link
Member Author

I like the suggestion that we don't specify if its push or pull which @alanwest mentioned.

I was taking this a step further and questioning whether we can just remove the entire in-memory exporter specification.

In contrast, I see value in the stdout exporter specification since it's pretty common for end users to pick it up when experimenting with the OTel SDKs. It makes sense to me that it has some semblance of uniform usage/behavior from language to language.

I'm uncertain if striving for uniformity should also be a requirement for the in-memory exporter as I'm unfamiliar with any scenarios where end users are using it.

@ocelotl
Copy link
Contributor

ocelotl commented Mar 22, 2022

I was taking this a step further and questioning whether we can just remove the entire in-memory exporter specification.

Yes, I agree. The spec should not be concerned with debugging or testing tools. Both of them can be very language specific:

  • In the case of debugging, what this exporter can do, a debugger can do as well in many cases.
  • In the case of testing, what this exporter can do, a mock can do as well in many cases.

If this is still something that others consider should be part of the spec, at least make this optional.

@reyang reyang added the area:sdk Related to the SDK label Mar 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:sdk Related to the SDK spec:metrics Related to the specification/metrics directory
Projects
None yet
Development

No branches or pull requests

5 participants