-
Notifications
You must be signed in to change notification settings - Fork 888
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
SpanExporter interface inconsistency #2652
Comments
@dyladan since you already did some leg work studying this portion of the spec and some implementations, do you have a concrete proposal how to address this? |
I see 2 options:
|
If we go with 1 there may be other SDKs besides JS that need to be updated with the required function. If we go with 2 then any SDK like JS which haven't implemented it yet are not required to if they don't want to. |
Looking at history of when forceflush was added, I think this may have just been an omission and your option (1) is the intended solution. |
Yeah I think that is most likely the original intent |
What I mean was, there was a discussion in the PR about this specifically: #1452 (comment) Bogdan suggested opening a new issue PR to resolve it. |
In the specification for
SpanExporter
, the Interface Definition paragraph states:However there are 3 functions listed: Export, Shutdown, and ForceFlush.
Is
ForceFlush
a required method on the SpanExporter interface?Additional Context
While implementing the metrics SDK
InMemoryMetricsExporter
, there was some debate in the JS SIG on if we should have a separatereset
method or if theforceFlush
method should reset the in-memory state of the exporter. While deciding what to do, we looked at theInMemorySpanExporter
for inspiration and found that it was usingreset
but did not even implementForceFlush
. SinceForceFlush
is specified, we realized we had to implement it and an issue (open-telemetry/opentelemetry-js#3067) was created to track this. While working on the issue we became confused by the wording of the spec and are unsure if the spec is trying to require ForceFlush or specifying behavior for an optional interface. All behaviors of ForceFlush are specified as SHOULD requirements.The text was updated successfully, but these errors were encountered: