Sitelet https://github.com/Microsoft/ApplicationInsights-dotnet/issues/844
Skip to content

Flags for envelope #844

Description

C# API for https://github.com/Microsoft/ApplicationInsights-Home/issues/232

New field flags on envelope will be used to set transport level characteristics for events. First one will be an ability to instruct endpoint to drop IP address.

We are working on feature to enable collection of full IP addresses. There will be a setting to opt-out from this behavior for entire Application Insights resource. Flags will enable to hide IP address for a single event. This way one can configure per-tenant or per-feature IP address collection to satisfy privacy requirements for a given app better.

Proposed API

Set flags for individual item. Typically for events that should not contain any PII. Typical example will be to set it based on user setting. If user accepted collecting her IP address - this flag is not set. Otherwise - set the flag.

EventTelemetry t = new EventTelemetry("Secret message") { Flags = TelemetryContext.FlagDropIdentifiers };
client.TrackEvent(t);

Set flags for client. Typical use is to set flags on all events produced by specific client.

var client = new TelemetryClient();
client.Context.Flags |= TelemetryContext.FlagDropIdentifiers;
client.TrackEvent("secret message");

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions