"use strict";
/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.NoopOTelService = void 0;
const event_1 = require("../../../util/vs/base/common/event");
const noopSpan = {
    setAttribute() { },
    setAttributes() { },
    setStatus() { },
    recordException() { },
    addEvent() { },
    getSpanContext() { return undefined; },
    end() { },
};
/**
 * No-op implementation of IOTelService.
 * All methods are zero-cost when OTel is disabled.
 */
class NoopOTelService {
    constructor(config) {
        this.onDidCompleteSpan = event_1.Event.None;
        this.onDidEmitSpanEvent = event_1.Event.None;
        this.config = config;
    }
    startSpan(_name, _options) {
        return noopSpan;
    }
    startActiveSpan(_name, _options, fn) {
        return fn(noopSpan);
    }
    getActiveTraceContext() {
        return undefined;
    }
    storeTraceContext(_key, _context) { }
    getStoredTraceContext(_key) {
        return undefined;
    }
    runWithTraceContext(_traceContext, fn) {
        return fn();
    }
    recordMetric(_name, _value, _attributes) { }
    incrementCounter(_name, _value, _attributes) { }
    emitLogRecord(_body, _attributes) { }
    async flush() { }
    async shutdown() { }
    injectCompletedSpan(_span) { }
}
exports.NoopOTelService = NoopOTelService;
//# sourceMappingURL=noopOtelService.js.map