"use strict";
/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.AppInsightsTelemetryConsumer = void 0;
/**
 * An implementation of {@link ITelemetryConsumer} that routes {@link IFluidTelemetry} to Azure App Insights
 * in a format that is supported by Fluid Framework service offerings such as Cloud dashboards and alarms.
 *
 * @beta
 */
class AppInsightsTelemetryConsumer {
    constructor(appInsightsClient) {
        this.appInsightsClient = appInsightsClient;
    }
    /**
     * Takes the incoming {@link IFluidTelemetry} and sends it to Azure App Insights
     */
    consume(event) {
        this.appInsightsClient.trackEvent({
            name: event.eventName,
            properties: event,
        });
    }
}
exports.AppInsightsTelemetryConsumer = AppInsightsTelemetryConsumer;
//# sourceMappingURL=appInsightsTelemetryConsumer.js.map