-
Notifications
You must be signed in to change notification settings - Fork 287
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
Expose TelemetryClient.TelemetryConfiguration publically. #581
Comments
It was explicitly made private so there will be no confusion and undesired consequences. When one changes anything in We also never had a real life scenarios where this was needed and not enough just to keep configuration object around. |
I see this as a yet another of the TelemetryClient layering. :( public static void TrackMetricValue(this TelemetryClient client, string metric, double value) If there is an alternative way to achieve this effect, please let me know so I can explore it. |
I am looking at this method:
We could consider a similar approach. |
Fix #581 (Changed TelemetryConfiguration property of TelemetryClient from internal to public.)
TelemetryClient brings together 3 concepts: Properties of items sent through it (Context), information about how and where to send the items (TelemetryConfiguration) and APIs to do the sending (TrackXxx(..) methods). Although both of the former aspects are required to create a client (TelemetryConfiguration.Active is used as default, but implicitly, that information is still encapsulated), only the Context is exposed outside of Core.
This is unfortunate: A consumer of a TelemetryClient may want to access information about how and where the client will deliver data. For example, metrics are aggregated across all clients within the same configuration, but separately between pipeline configurations. So, aggregation logic needs to be able to ask a client, what its telemetry configuration instance is.
The proposed change is to make the existing internal TelemetryClient.TelemetryConfiguration property public.
The text was updated successfully, but these errors were encountered: