UNPKG

applicationinsights

Version:

Microsoft Application Insights module for Node.js

38 lines 1.73 kB
"use strict"; /* * Copyright (c) Microsoft Corporation. * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.ApplicationInsightsClientContext = void 0; const coreClient = require("@azure/core-client"); class ApplicationInsightsClientContext extends coreClient.ServiceClient { /** * Initializes a new instance of the ApplicationInsightsClientContext class. * @param options The parameter options */ constructor(options) { // Initializing default values for options if (!options) { options = {}; } const defaults = { requestContentType: "application/json; charset=utf-8", }; const packageDetails = `azsdk-js-monitor-opentelemetry-exporter/1.0.0-beta.7`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` : `${packageDetails}`; const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: { userAgentPrefix, }, baseUri: options.endpoint || "{Host}/v2.1" }); super(optionsWithDefaults); // Assigning values to Constant parameters this.host = options.host || "https://dc.services.visualstudio.com"; } } exports.ApplicationInsightsClientContext = ApplicationInsightsClientContext; //# sourceMappingURL=applicationInsightsClientContext.js.map