Replies: 3 comments 2 replies
-
Note: if we do add a
And have it no-op if no shutdown method is provided, which I think is the best-of-both-worlds. |
Beta Was this translation helpful? Give feedback.
-
Adding @markfields who was also looking into client telemetry |
Beta Was this translation helpful? Give feedback.
-
@jvoels - I think there are two use cases we're discussing here:
For (1), I'm not sure it belongs on For (2), we have ways to add common metadata to all logs within a given context, so could we add a property to the logs that we filter on when we want pure production telemetry? That way we still get telemetry in the experimental cases, which could be valuable. And as we roll out richer feature flag support, the lines could get blurry here. So I'm not convinced yet :P Thoughts? |
Beta Was this translation helpful? Give feedback.
-
FluidFramework/common/lib/common-definitions/src/logger.ts
Line 33 in cd3c8a8
Raising the discussion if
ITelemetryBaseLogger
should expose an optional shutdown method for the need to cease event flow, flush, and release resources as soon as deemed by any point in the application flow where this interface typically represents the contract for the logger.The inspiring use case I have currently is when a hosting application that is running against a non-test, non-local environment is equipped with test in production hooks and used to side load experimental code changes. This hosting application is still generating telemetry data that is used in a non-test, non-local store with dimensions that had been and still may continue to imply critical monitoring and metrics signals. They are effectively invalidated by the side-loading activities.
Since the telemetry data is used in N > 1 consumption patterns by multiple systems, a DRY solution is needed upstream near or in front of the event collection pipelines to exclude potentially misleading or invalid event streams. The most obvious and earliest way to achieve this seems to be to allow the client application/host to stop sending events in such scenarios.
Motivations may vary but this does not seem to be an entirely unique concept for a logger. It shows up in public documentation for MSBuild logger and open telemetry specification.
@hedasilv @TriDucNgo @znewton
Beta Was this translation helpful? Give feedback.
All reactions