Skip to content
This repository was archived by the owner on Jul 5, 2020. It is now read-only.
This repository was archived by the owner on Jul 5, 2020. It is now read-only.

Support reading metadata when collecting EventCounter data #1287

@Expecho

Description

@Expecho

Regarding the (new) Microsoft.ApplicationInsights.EventCounterCollector:

When I define a custom EventCounter I can add metadata to it:

methodDurationCounter = new EventCounter(nameof(methodDurationCounter), this);
methodDurationCounter.AddMetadata("Environment", "Production");
methodDurationCounter.AddMetadata("Customer", "Ibis");

This metadata is added to the payload. I would be very happy when this data is included as custom properties of the MetricTelemetry that is send. See the source.

I would be more than willing to provide a PR for this.

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