@ms-cloudpack/telemetry 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/AppInsights/AppInsightsTelemetryClient.d.ts +2 -1
- package/lib/AppInsights/AppInsightsTelemetryClient.d.ts.map +1 -1
- package/lib/AppInsights/AppInsightsTelemetryClient.js.map +1 -1
- package/lib/AppInsights/convertLogLevel.d.ts +1 -1
- package/lib/AppInsights/convertLogLevel.d.ts.map +1 -1
- package/lib/AppInsights/convertLogLevel.js.map +1 -1
- package/lib/AppInsights/getAppInsightsConfig.d.ts +1 -1
- package/lib/AppInsights/getAppInsightsConfig.d.ts.map +1 -1
- package/lib/AppInsights/getAppInsightsConfig.js.map +1 -1
- package/lib/NoOp/NoOpTelemetryClient.d.ts +1 -1
- package/lib/NoOp/NoOpTelemetryClient.d.ts.map +1 -1
- package/lib/NoOp/NoOpTelemetryClient.js.map +1 -1
- package/lib/createTelemetryClient.d.ts +2 -1
- package/lib/createTelemetryClient.d.ts.map +1 -1
- package/lib/createTelemetryClient.js.map +1 -1
- package/lib/index.d.ts +3 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/tsdoc-metadata.json +11 -11
- package/lib/types/LogLevel.d.ts +2 -0
- package/lib/types/LogLevel.d.ts.map +1 -0
- package/lib/types/LogLevel.js +2 -0
- package/lib/types/LogLevel.js.map +1 -0
- package/lib/types/TelemetryClient.d.ts +19 -0
- package/lib/types/TelemetryClient.d.ts.map +1 -0
- package/lib/types/TelemetryClient.js +2 -0
- package/lib/types/TelemetryClient.js.map +1 -0
- package/lib/{types.d.ts → types/TelemetryOptions.d.ts} +2 -20
- package/lib/types/TelemetryOptions.d.ts.map +1 -0
- package/lib/types/TelemetryOptions.js +2 -0
- package/lib/types/TelemetryOptions.js.map +1 -0
- package/package.json +2 -3
- package/lib/types.d.ts.map +0 -1
- package/lib/types.js +0 -2
- package/lib/types.js.map +0 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Tracer } from '@opentelemetry/api';
|
|
2
|
-
import type {
|
|
2
|
+
import type { TelemetryOptions } from '../types/TelemetryOptions.js';
|
|
3
|
+
import type { TelemetryClient } from '../types/TelemetryClient.js';
|
|
3
4
|
export declare class AppInsightsTelemetryClient implements TelemetryClient {
|
|
4
5
|
private readonly appInsightsClient;
|
|
5
6
|
private readonly sharedSpanAttributes;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppInsightsTelemetryClient.d.ts","sourceRoot":"","sources":["../../src/AppInsights/AppInsightsTelemetryClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAMjD,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"AppInsightsTelemetryClient.d.ts","sourceRoot":"","sources":["../../src/AppInsights/AppInsightsTelemetryClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAMjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAEnE,qBAAa,0BAA2B,YAAW,eAAe;IAChE,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAA4B;IAC9D,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAA8B;gBAEvD,OAAO,EAAE,gBAAgB;IAiBrC;;;;OAIG;IACI,sBAAsB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAIxD;;OAEG;IACU,QAAQ;IAKrB;;;OAGG;IACI,SAAS,IAAI,MAAM;CAG3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppInsightsTelemetryClient.js","sourceRoot":"","sources":["../../src/AppInsights/AppInsightsTelemetryClient.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE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AsB,CAAC,GAAW,EAAE,KAAa;QACtD,IAAI,CAAC,oBAAoB,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;IACzC,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,QAAQ;QACnB,MAAM,IAAI,CAAC,iBAAiB,EAAE,KAAK,EAAE,CAAC;QACtC,MAAM,IAAI,CAAC,iBAAiB,EAAE,QAAQ,EAAE,CAAC;IAC3C,CAAC;IAED;;;OAGG;IACI,SAAS;QACd,OAAO,IAAI,CAAC,iBAAiB,EAAE,eAAe,EAAE,CAAC,SAAS,EAAE,CAAC;IAC/D,CAAC;CACF","sourcesContent":["import type { Tracer } from '@opentelemetry/api';\nimport type { NodeTracerProvider } from '@opentelemetry/sdk-trace-node';\nimport { ApplicationInsightsClient } from 'applicationinsights';\nimport { convertLogLevel } from './convertLogLevel.js';\nimport { getAppInsightsConfig } from './getAppInsightsConfig.js';\nimport { SpanEnrichingProcessor } from './SpanEnrichingProcessor.js';\nimport type { TelemetryOptions } from '../types/TelemetryOptions.js';\nimport type { TelemetryClient } from '../types/TelemetryClient.js';\n\nexport class AppInsightsTelemetryClient implements TelemetryClient {\n private readonly appInsightsClient: ApplicationInsightsClient;\n private readonly sharedSpanAttributes: Record<string, string> = {};\n\n constructor(options: TelemetryOptions) {\n const config = getAppInsightsConfig(options);\n\n this.appInsightsClient = new ApplicationInsightsClient(config);\n\n this.appInsightsClient.getLogger().updateLogLevel(convertLogLevel(options.logLevel));\n\n // Set shared attributes\n this.setSharedSpanAttribute('version', options.productVersion);\n\n // Set SpanEnrichingProcessor to add shared attributes to all spans\n const nodeTraceProvider = <NodeTracerProvider>this.appInsightsClient.getTraceHandler().getTracerProvider();\n nodeTraceProvider.addSpanProcessor(new SpanEnrichingProcessor(() => this.sharedSpanAttributes));\n\n this.appInsightsClient.start();\n }\n\n /**\n * Sets a shared attribute that will be added to all spans.\n * @param key - key of the attribute\n * @param value - value of the attribute\n */\n public setSharedSpanAttribute(key: string, value: string) {\n this.sharedSpanAttributes[key] = value;\n }\n\n /**\n * Flushes all telemetry and shuts down the telemetry client.\n */\n public async shutdown() {\n await this.appInsightsClient?.flush();\n await this.appInsightsClient?.shutdown();\n }\n\n /**\n * Gets the OpenTelemetry tracer.\n * @returns the OpenTelemetry tracer\n */\n public getTracer(): Tracer {\n return this.appInsightsClient?.getTraceHandler().getTracer();\n }\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { DiagLogLevel } from '@opentelemetry/api';
|
|
2
|
-
import type { LogLevel } from '../types.js';
|
|
2
|
+
import type { LogLevel } from '../types/LogLevel.js';
|
|
3
3
|
export declare function convertLogLevel(logLevel?: LogLevel): DiagLogLevel;
|
|
4
4
|
//# sourceMappingURL=convertLogLevel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convertLogLevel.d.ts","sourceRoot":"","sources":["../../src/AppInsights/convertLogLevel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"convertLogLevel.d.ts","sourceRoot":"","sources":["../../src/AppInsights/convertLogLevel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAErD,wBAAgB,eAAe,CAAC,QAAQ,CAAC,EAAE,QAAQ,GAAG,YAAY,CAkBjE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convertLogLevel.js","sourceRoot":"","sources":["../../src/AppInsights/convertLogLevel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGlD,MAAM,UAAU,eAAe,CAAC,QAAmB;IACjD,QAAQ,QAAQ,EAAE;QAChB,KAAK,OAAO;YACV,OAAO,YAAY,CAAC,KAAK,CAAC;QAC5B,KAAK,SAAS;YACZ,OAAO,YAAY,CAAC,OAAO,CAAC;QAC9B,KAAK,MAAM;YACT,OAAO,YAAY,CAAC,IAAI,CAAC;QAC3B,KAAK,OAAO;YACV,OAAO,YAAY,CAAC,KAAK,CAAC;QAC5B,KAAK,KAAK;YACR,OAAO,YAAY,CAAC,GAAG,CAAC;QAC1B,KAAK,MAAM;YACT,OAAO,YAAY,CAAC,IAAI,CAAC;QAC3B,KAAK,MAAM,CAAC;QACZ;YACE,OAAO,YAAY,CAAC,IAAI,CAAC;KAC5B;AACH,CAAC","sourcesContent":["import { DiagLogLevel } from '@opentelemetry/api';\nimport type { LogLevel } from '../types.js';\n\nexport function convertLogLevel(logLevel?: LogLevel): DiagLogLevel {\n switch (logLevel) {\n case 'DEBUG':\n return DiagLogLevel.DEBUG;\n case 'VERBOSE':\n return DiagLogLevel.VERBOSE;\n case 'NONE':\n return DiagLogLevel.NONE;\n case 'ERROR':\n return DiagLogLevel.ERROR;\n case 'ALL':\n return DiagLogLevel.ALL;\n case 'INFO':\n return DiagLogLevel.INFO;\n case 'WARN':\n default:\n return DiagLogLevel.WARN;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"convertLogLevel.js","sourceRoot":"","sources":["../../src/AppInsights/convertLogLevel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGlD,MAAM,UAAU,eAAe,CAAC,QAAmB;IACjD,QAAQ,QAAQ,EAAE;QAChB,KAAK,OAAO;YACV,OAAO,YAAY,CAAC,KAAK,CAAC;QAC5B,KAAK,SAAS;YACZ,OAAO,YAAY,CAAC,OAAO,CAAC;QAC9B,KAAK,MAAM;YACT,OAAO,YAAY,CAAC,IAAI,CAAC;QAC3B,KAAK,OAAO;YACV,OAAO,YAAY,CAAC,KAAK,CAAC;QAC5B,KAAK,KAAK;YACR,OAAO,YAAY,CAAC,GAAG,CAAC;QAC1B,KAAK,MAAM;YACT,OAAO,YAAY,CAAC,IAAI,CAAC;QAC3B,KAAK,MAAM,CAAC;QACZ;YACE,OAAO,YAAY,CAAC,IAAI,CAAC;KAC5B;AACH,CAAC","sourcesContent":["import { DiagLogLevel } from '@opentelemetry/api';\nimport type { LogLevel } from '../types/LogLevel.js';\n\nexport function convertLogLevel(logLevel?: LogLevel): DiagLogLevel {\n switch (logLevel) {\n case 'DEBUG':\n return DiagLogLevel.DEBUG;\n case 'VERBOSE':\n return DiagLogLevel.VERBOSE;\n case 'NONE':\n return DiagLogLevel.NONE;\n case 'ERROR':\n return DiagLogLevel.ERROR;\n case 'ALL':\n return DiagLogLevel.ALL;\n case 'INFO':\n return DiagLogLevel.INFO;\n case 'WARN':\n default:\n return DiagLogLevel.WARN;\n }\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ApplicationInsightsConfig } from 'applicationinsights';
|
|
2
|
-
import type { TelemetryOptions } from '../types.js';
|
|
2
|
+
import type { TelemetryOptions } from '../types/TelemetryOptions.js';
|
|
3
3
|
export declare function getAppInsightsConfig(options: TelemetryOptions): ApplicationInsightsConfig;
|
|
4
4
|
//# sourceMappingURL=getAppInsightsConfig.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getAppInsightsConfig.d.ts","sourceRoot":"","sources":["../../src/AppInsights/getAppInsightsConfig.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAGhE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"getAppInsightsConfig.d.ts","sourceRoot":"","sources":["../../src/AppInsights/getAppInsightsConfig.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAGhE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAMrE,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,gBAAgB,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IAAI,QAAQ,CAAC;QAC7B,+CAA+C;QAC/C,CAAC,0BAA0B,CAAC,mBAAmB,CAAC,EAAE,MAAM,CAAC,eAAe,EAAE,CAAC;QAC3E,CAAC,0BAA0B,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC,WAAW;QAC9D,CAAC,0BAA0B,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAC,gBAAgB;KACzE,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["import { Resource } from '@opentelemetry/resources';\nimport { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';\nimport { ApplicationInsightsConfig } from 'applicationinsights';\nimport { createHash } from 'crypto';\nimport { getComputerName } from './getComputerName.js';\nimport type { TelemetryOptions } from '../types.js';\n\nfunction sha256(input: string) {\n return createHash('sha256').update(input).digest('hex');\n}\n\nexport function getAppInsightsConfig(options: TelemetryOptions) {\n const config = new ApplicationInsightsConfig();\n config.connectionString = `InstrumentationKey=${options.instrumentationKey}`;\n config.enableAutoCollectExceptions = false;\n config.enableAutoCollectHeartbeat = false;\n config.enableAutoCollectPerformance = false;\n config.enableAutoCollectStandardMetrics = false;\n config.instrumentations = {\n http: {\n enabled: false,\n },\n azureSdk: {\n enabled: false,\n },\n };\n config.logInstrumentations = {\n bunyan: {\n enabled: false,\n },\n console: {\n enabled: false,\n },\n winston: {\n enabled: false,\n },\n };\n\n config.resource = new Resource({\n // Use a hash of the computer name to avoid PII\n [SemanticResourceAttributes.SERVICE_INSTANCE_ID]: sha256(getComputerName()),\n [SemanticResourceAttributes.SERVICE_NAME]: options.serviceName,\n [SemanticResourceAttributes.SERVICE_NAMESPACE]: options.serviceNamespace,\n });\n\n return config;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"getAppInsightsConfig.js","sourceRoot":"","sources":["../../src/AppInsights/getAppInsightsConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAA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AAC,iBAAiB,CAAC,EAAE,OAAO,CAAC,gBAAgB;KACzE,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["import { Resource } from '@opentelemetry/resources';\nimport { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';\nimport { ApplicationInsightsConfig } from 'applicationinsights';\nimport { createHash } from 'crypto';\nimport { getComputerName } from './getComputerName.js';\nimport type { TelemetryOptions } from '../types/TelemetryOptions.js';\n\nfunction sha256(input: string) {\n return createHash('sha256').update(input).digest('hex');\n}\n\nexport function getAppInsightsConfig(options: TelemetryOptions) {\n const config = new ApplicationInsightsConfig();\n config.connectionString = `InstrumentationKey=${options.instrumentationKey}`;\n config.enableAutoCollectExceptions = false;\n config.enableAutoCollectHeartbeat = false;\n config.enableAutoCollectPerformance = false;\n config.enableAutoCollectStandardMetrics = false;\n config.instrumentations = {\n http: {\n enabled: false,\n },\n azureSdk: {\n enabled: false,\n },\n };\n config.logInstrumentations = {\n bunyan: {\n enabled: false,\n },\n console: {\n enabled: false,\n },\n winston: {\n enabled: false,\n },\n };\n\n config.resource = new Resource({\n // Use a hash of the computer name to avoid PII\n [SemanticResourceAttributes.SERVICE_INSTANCE_ID]: sha256(getComputerName()),\n [SemanticResourceAttributes.SERVICE_NAME]: options.serviceName,\n [SemanticResourceAttributes.SERVICE_NAMESPACE]: options.serviceNamespace,\n });\n\n return config;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NoOpTelemetryClient.d.ts","sourceRoot":"","sources":["../../src/NoOp/NoOpTelemetryClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"NoOpTelemetryClient.d.ts","sourceRoot":"","sources":["../../src/NoOp/NoOpTelemetryClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C;;;GAGG;AACH,qBAAa,mBAAoB,YAAW,eAAe;IACzD,OAAO,CAAC,MAAM,CAAoB;IAElC,sBAAsB,IAAI,eAAe;IAKzC,QAAQ;IAKR,SAAS;CAGV"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NoOpTelemetryClient.js","sourceRoot":"","sources":["../../src/NoOp/NoOpTelemetryClient.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C;;;GAGG;AACH,MAAM,OAAO,mBAAmB;IAAhC;QACU,WAAM,GAAG,IAAI,UAAU,EAAE,CAAC;IAepC,CAAC;IAbC,sBAAsB;QACpB,QAAQ;QACR,OAAO,IAAI,CAAC;IACd,CAAC;IAED,QAAQ;QACN,QAAQ;QACR,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC3B,CAAC;IAED,SAAS;QACP,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;CACF","sourcesContent":["import type { TelemetryClient } from '../types.js';\nimport { NoOpTracer } from './NoOpTracer.js';\n\n/**\n * No-op implementation of {@link TelemetryClient}.\n * This class will be used when Telemetry is disabled.\n */\nexport class NoOpTelemetryClient implements TelemetryClient {\n private tracer = new NoOpTracer();\n\n setSharedSpanAttribute(): TelemetryClient {\n // No-op\n return this;\n }\n\n shutdown() {\n // No-op\n return Promise.resolve();\n }\n\n getTracer() {\n return this.tracer;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"NoOpTelemetryClient.js","sourceRoot":"","sources":["../../src/NoOp/NoOpTelemetryClient.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C;;;GAGG;AACH,MAAM,OAAO,mBAAmB;IAAhC;QACU,WAAM,GAAG,IAAI,UAAU,EAAE,CAAC;IAepC,CAAC;IAbC,sBAAsB;QACpB,QAAQ;QACR,OAAO,IAAI,CAAC;IACd,CAAC;IAED,QAAQ;QACN,QAAQ;QACR,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC3B,CAAC;IAED,SAAS;QACP,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;CACF","sourcesContent":["import type { TelemetryClient } from '../types/TelemetryClient.js';\nimport { NoOpTracer } from './NoOpTracer.js';\n\n/**\n * No-op implementation of {@link TelemetryClient}.\n * This class will be used when Telemetry is disabled.\n */\nexport class NoOpTelemetryClient implements TelemetryClient {\n private tracer = new NoOpTracer();\n\n setSharedSpanAttribute(): TelemetryClient {\n // No-op\n return this;\n }\n\n shutdown() {\n // No-op\n return Promise.resolve();\n }\n\n getTracer() {\n return this.tracer;\n }\n}\n"]}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { TelemetryOptions } from './types/TelemetryOptions.js';
|
|
2
|
+
import type { TelemetryClient } from './types/TelemetryClient.js';
|
|
2
3
|
export declare function createTelemetryClient(options: TelemetryOptions): Promise<TelemetryClient>;
|
|
3
4
|
//# sourceMappingURL=createTelemetryClient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createTelemetryClient.d.ts","sourceRoot":"","sources":["../src/createTelemetryClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"createTelemetryClient.d.ts","sourceRoot":"","sources":["../src/createTelemetryClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAElE,wBAAsB,qBAAqB,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,eAAe,CAAC,CAe/F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createTelemetryClient.js","sourceRoot":"","sources":["../src/createTelemetryClient.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"createTelemetryClient.js","sourceRoot":"","sources":["../src/createTelemetryClient.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,OAAyB;IACnE,IAAI,CAAC,OAAO,CAAC,kBAAkB,EAAE;QAC/B,OAAO,CAAC,KAAK,CAAC,yDAAyD,CAAC,CAAC;QAEzE,wEAAwE;QACxE,MAAM,EAAE,mBAAmB,EAAE,GAAG,MAAM,MAAM,CAAC,+BAA+B,CAAC,CAAC;QAC9E,OAAO,IAAI,mBAAmB,EAAE,CAAC;KAClC;IAED,0EAA0E;IAC1E,OAAO,CAAC,GAAG,CAAC,iDAAiD,GAAG,OAAO,CAAC,QAAQ,IAAI,MAAM,CAAC;IAE3F,yDAAyD;IACzD,MAAM,EAAE,0BAA0B,EAAE,GAAG,MAAM,MAAM,CAAC,6CAA6C,CAAC,CAAC;IACnG,OAAO,IAAI,0BAA0B,CAAC,OAAO,CAAC,CAAC;AACjD,CAAC","sourcesContent":["import type { TelemetryOptions } from './types/TelemetryOptions.js';\nimport type { TelemetryClient } from './types/TelemetryClient.js';\n\nexport async function createTelemetryClient(options: TelemetryOptions): Promise<TelemetryClient> {\n if (!options.instrumentationKey) {\n console.debug('No connection string found. Telemetry will not be sent.');\n\n // Create a no-op telemetry client if no instrumentation key is provided\n const { NoOpTelemetryClient } = await import('./NoOp/NoOpTelemetryClient.js');\n return new NoOpTelemetryClient();\n }\n\n // Set initial log level to WARN to avoid logging telemetry initialization\n process.env.APPLICATIONINSIGHTS_INSTRUMENTATION_LOGGING_LEVEL = options.logLevel || 'WARN';\n\n // Import TelemetryClient after setting initial log level\n const { AppInsightsTelemetryClient } = await import('./AppInsights/AppInsightsTelemetryClient.js');\n return new AppInsightsTelemetryClient(options);\n}\n"]}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export type { Span, Tracer } from '@opentelemetry/api';
|
|
2
2
|
export { createTelemetryClient } from './createTelemetryClient.js';
|
|
3
|
-
export type { LogLevel
|
|
3
|
+
export type { LogLevel } from './types/LogLevel.js';
|
|
4
|
+
export type { TelemetryClient } from './types/TelemetryClient.js';
|
|
5
|
+
export type { TelemetryOptions } from './types/TelemetryOptions.js';
|
|
4
6
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,YAAY,EAAE,QAAQ,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,YAAY,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,YAAY,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,YAAY,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC"}
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC","sourcesContent":["export type { Span, Tracer } from '@opentelemetry/api';\nexport { createTelemetryClient } from './createTelemetryClient.js';\nexport type { LogLevel
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC","sourcesContent":["export type { Span, Tracer } from '@opentelemetry/api';\nexport { createTelemetryClient } from './createTelemetryClient.js';\nexport type { LogLevel } from './types/LogLevel.js';\nexport type { TelemetryClient } from './types/TelemetryClient.js';\nexport type { TelemetryOptions } from './types/TelemetryOptions.js';\n"]}
|
package/lib/tsdoc-metadata.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
// This file is read by tools that parse documentation comments conforming to the TSDoc standard.
|
|
2
|
-
// It should be published with your NPM package. It should not be tracked by Git.
|
|
3
|
-
{
|
|
4
|
-
"tsdocVersion": "0.12",
|
|
5
|
-
"toolPackages": [
|
|
6
|
-
{
|
|
7
|
-
"packageName": "@microsoft/api-extractor",
|
|
8
|
-
"packageVersion": "7.34.
|
|
9
|
-
}
|
|
10
|
-
]
|
|
11
|
-
}
|
|
1
|
+
// This file is read by tools that parse documentation comments conforming to the TSDoc standard.
|
|
2
|
+
// It should be published with your NPM package. It should not be tracked by Git.
|
|
3
|
+
{
|
|
4
|
+
"tsdocVersion": "0.12",
|
|
5
|
+
"toolPackages": [
|
|
6
|
+
{
|
|
7
|
+
"packageName": "@microsoft/api-extractor",
|
|
8
|
+
"packageVersion": "7.34.8"
|
|
9
|
+
}
|
|
10
|
+
]
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogLevel.d.ts","sourceRoot":"","sources":["../../src/types/LogLevel.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,KAAK,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogLevel.js","sourceRoot":"","sources":["../../src/types/LogLevel.ts"],"names":[],"mappings":"","sourcesContent":["export type LogLevel = 'NONE' | 'ERROR' | 'WARN' | 'INFO' | 'DEBUG' | 'VERBOSE' | 'ALL';\n"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Tracer } from '@opentelemetry/api';
|
|
2
|
+
export interface TelemetryClient {
|
|
3
|
+
/**
|
|
4
|
+
* Sets a shared attribute that will be added to all spans.
|
|
5
|
+
* @param key - key of the attribute
|
|
6
|
+
* @param value - value of the attribute
|
|
7
|
+
*/
|
|
8
|
+
setSharedSpanAttribute(key: string, value: string): void;
|
|
9
|
+
/**
|
|
10
|
+
* Flushes all telemetry and shuts down the telemetry client.
|
|
11
|
+
*/
|
|
12
|
+
shutdown(): Promise<void>;
|
|
13
|
+
/**
|
|
14
|
+
* Gets the OpenTelemetry tracer.
|
|
15
|
+
* @returns the OpenTelemetry tracer
|
|
16
|
+
*/
|
|
17
|
+
getTracer(): Tracer;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=TelemetryClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TelemetryClient.d.ts","sourceRoot":"","sources":["../../src/types/TelemetryClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAEjD,MAAM,WAAW,eAAe;IAC9B;;;;OAIG;IACH,sBAAsB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAEzD;;OAEG;IACH,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAE1B;;;OAGG;IACH,SAAS,IAAI,MAAM,CAAC;CACrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TelemetryClient.js","sourceRoot":"","sources":["../../src/types/TelemetryClient.ts"],"names":[],"mappings":"","sourcesContent":["import type { Tracer } from '@opentelemetry/api';\n\nexport interface TelemetryClient {\n /**\n * Sets a shared attribute that will be added to all spans.\n * @param key - key of the attribute\n * @param value - value of the attribute\n */\n setSharedSpanAttribute(key: string, value: string): void;\n\n /**\n * Flushes all telemetry and shuts down the telemetry client.\n */\n shutdown(): Promise<void>;\n\n /**\n * Gets the OpenTelemetry tracer.\n * @returns the OpenTelemetry tracer\n */\n getTracer(): Tracer;\n}\n"]}
|
|
@@ -1,22 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export type LogLevel = 'NONE' | 'ERROR' | 'WARN' | 'INFO' | 'DEBUG' | 'VERBOSE' | 'ALL';
|
|
3
|
-
export interface TelemetryClient {
|
|
4
|
-
/**
|
|
5
|
-
* Sets a shared attribute that will be added to all spans.
|
|
6
|
-
* @param key - key of the attribute
|
|
7
|
-
* @param value - value of the attribute
|
|
8
|
-
*/
|
|
9
|
-
setSharedSpanAttribute(key: string, value: string): void;
|
|
10
|
-
/**
|
|
11
|
-
* Flushes all telemetry and shuts down the telemetry client.
|
|
12
|
-
*/
|
|
13
|
-
shutdown(): Promise<void>;
|
|
14
|
-
/**
|
|
15
|
-
* Gets the OpenTelemetry tracer.
|
|
16
|
-
* @returns the OpenTelemetry tracer
|
|
17
|
-
*/
|
|
18
|
-
getTracer(): Tracer;
|
|
19
|
-
}
|
|
1
|
+
import type { LogLevel } from './LogLevel.js';
|
|
20
2
|
export interface TelemetryOptions {
|
|
21
3
|
/**
|
|
22
4
|
* The instrumentation key for the Application Insights.
|
|
@@ -41,4 +23,4 @@ export interface TelemetryOptions {
|
|
|
41
23
|
*/
|
|
42
24
|
serviceName: string;
|
|
43
25
|
}
|
|
44
|
-
//# sourceMappingURL=
|
|
26
|
+
//# sourceMappingURL=TelemetryOptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TelemetryOptions.d.ts","sourceRoot":"","sources":["../../src/types/TelemetryOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE9C,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B;;OAEG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAEpB;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;CACrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TelemetryOptions.js","sourceRoot":"","sources":["../../src/types/TelemetryOptions.ts"],"names":[],"mappings":"","sourcesContent":["import type { LogLevel } from './LogLevel.js';\n\nexport interface TelemetryOptions {\n /**\n * The instrumentation key for the Application Insights.\n */\n instrumentationKey?: string;\n\n /**\n * The log level for the telemetry client.\n */\n logLevel?: LogLevel;\n\n /**\n * The version of the product. This will be added as a shared attribute to all spans.\n */\n productVersion: string;\n\n /**\n * A string value having a meaning that helps to distinguish a group of services, for example the team name that owns a group of services.\n * Possible values: cloudpack, cloudpack.services, etc.\n */\n serviceNamespace: string;\n\n /**\n * Logic name of the service\n * Possible values: cli, bundler-service, etc.\n */\n serviceName: string;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ms-cloudpack/telemetry",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Helpers for logging tasks to the console.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -21,11 +21,10 @@
|
|
|
21
21
|
"applicationinsights": "^3.0.0-beta.2"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@ms-cloudpack/eslint-
|
|
24
|
+
"@ms-cloudpack/eslint-plugin-internal": "*",
|
|
25
25
|
"@ms-cloudpack/scripts": "*"
|
|
26
26
|
},
|
|
27
27
|
"scripts": {
|
|
28
|
-
"api:update": "cloudpack-scripts api-update",
|
|
29
28
|
"api": "cloudpack-scripts api",
|
|
30
29
|
"build:watch": "cloudpack-scripts build-watch",
|
|
31
30
|
"build": "cloudpack-scripts build",
|
package/lib/types.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAEjD,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,KAAK,CAAC;AAExF,MAAM,WAAW,eAAe;IAC9B;;;;OAIG;IACH,sBAAsB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAEzD;;OAEG;IACH,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAE1B;;;OAGG;IACH,SAAS,IAAI,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B;;OAEG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAEpB;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;CACrB"}
|
package/lib/types.js
DELETED
package/lib/types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { Tracer } from '@opentelemetry/api';\n\nexport type LogLevel = 'NONE' | 'ERROR' | 'WARN' | 'INFO' | 'DEBUG' | 'VERBOSE' | 'ALL';\n\nexport interface TelemetryClient {\n /**\n * Sets a shared attribute that will be added to all spans.\n * @param key - key of the attribute\n * @param value - value of the attribute\n */\n setSharedSpanAttribute(key: string, value: string): void;\n\n /**\n * Flushes all telemetry and shuts down the telemetry client.\n */\n shutdown(): Promise<void>;\n\n /**\n * Gets the OpenTelemetry tracer.\n * @returns the OpenTelemetry tracer\n */\n getTracer(): Tracer;\n}\n\nexport interface TelemetryOptions {\n /**\n * The instrumentation key for the Application Insights.\n */\n instrumentationKey?: string;\n\n /**\n * The log level for the telemetry client.\n */\n logLevel?: LogLevel;\n\n /**\n * The version of the product. This will be added as a shared attribute to all spans.\n */\n productVersion: string;\n\n /**\n * A string value having a meaning that helps to distinguish a group of services, for example the team name that owns a group of services.\n * Possible values: cloudpack, cloudpack.services, etc.\n */\n serviceNamespace: string;\n\n /**\n * Logic name of the service\n * Possible values: cli, bundler-service, etc.\n */\n serviceName: string;\n}\n"]}
|