@microsoft/applicationinsights-debugplugin-js 3.4.0-nightlybeta3.2602-06 → 3.4.0-nightlybeta3.2602-11
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/browser/es5/{ai.dbg.3.4.0-nightlybeta3.2602-06.cjs.js → ai.dbg.3.4.0-nightlybeta3.2602-11.cjs.js} +4 -4
- package/browser/es5/ai.dbg.3.4.0-nightlybeta3.2602-11.cjs.js.map +1 -0
- package/browser/es5/ai.dbg.3.4.0-nightlybeta3.2602-11.cjs.min.js +6 -0
- package/browser/es5/ai.dbg.3.4.0-nightlybeta3.2602-11.cjs.min.js.map +1 -0
- package/browser/es5/{ai.dbg.3.4.0-nightlybeta3.2602-06.gbl.js → ai.dbg.3.4.0-nightlybeta3.2602-11.gbl.js} +6 -6
- package/browser/es5/ai.dbg.3.4.0-nightlybeta3.2602-11.gbl.js.map +1 -0
- package/browser/es5/ai.dbg.3.4.0-nightlybeta3.2602-11.gbl.min.js +6 -0
- package/browser/es5/ai.dbg.3.4.0-nightlybeta3.2602-11.gbl.min.js.map +1 -0
- package/browser/es5/ai.dbg.3.4.0-nightlybeta3.2602-11.integrity.json +66 -0
- package/browser/es5/{ai.dbg.3.4.0-nightlybeta3.2602-06.js → ai.dbg.3.4.0-nightlybeta3.2602-11.js} +6 -6
- package/browser/es5/ai.dbg.3.4.0-nightlybeta3.2602-11.js.map +1 -0
- package/browser/es5/ai.dbg.3.4.0-nightlybeta3.2602-11.min.js +6 -0
- package/browser/es5/ai.dbg.3.4.0-nightlybeta3.2602-11.min.js.map +1 -0
- package/browser/es5/ai.dbg.3.cjs.js +3 -3
- package/browser/es5/ai.dbg.3.cjs.js.map +1 -1
- package/browser/es5/ai.dbg.3.cjs.min.js +2 -2
- package/browser/es5/ai.dbg.3.cjs.min.js.map +1 -1
- package/browser/es5/ai.dbg.3.gbl.js +5 -5
- package/browser/es5/ai.dbg.3.gbl.js.map +1 -1
- package/browser/es5/ai.dbg.3.gbl.min.js +2 -2
- package/browser/es5/ai.dbg.3.gbl.min.js.map +1 -1
- package/browser/es5/ai.dbg.3.integrity.json +25 -25
- package/browser/es5/ai.dbg.3.js +5 -5
- package/browser/es5/ai.dbg.3.js.map +1 -1
- package/browser/es5/ai.dbg.3.min.js +2 -2
- package/browser/es5/ai.dbg.3.min.js.map +1 -1
- package/dist/es5/applicationinsights-debugplugin-js.js +3 -3
- package/dist/es5/applicationinsights-debugplugin-js.js.map +1 -1
- package/dist/es5/applicationinsights-debugplugin-js.min.js +2 -2
- package/dist/es5/applicationinsights-debugplugin-js.min.js.map +1 -1
- package/dist-es5/DebugPlugin.js +1 -1
- package/dist-es5/__DynamicConstants.js +1 -1
- package/dist-es5/applicationinsights-debugplugin-js.js +1 -1
- package/dist-es5/components/Dashboard.js +1 -1
- package/dist-es5/components/LogEntry.js +1 -1
- package/dist-es5/components/debugBins.js +1 -1
- package/dist-es5/components/filterList.js +1 -1
- package/dist-es5/components/helpers.js +1 -1
- package/dist-es5/components/styleNodeSrc.js +1 -1
- package/dist-es5/interfaces/IDebugPluginConfig.js +1 -1
- package/package.json +6 -6
- package/types/applicationinsights-debugplugin-js.d.ts +1 -1
- package/types/applicationinsights-debugplugin-js.namespaced.d.ts +264 -16
- package/browser/es5/ai.dbg.3.4.0-nightlybeta3.2602-06.cjs.js.map +0 -1
- package/browser/es5/ai.dbg.3.4.0-nightlybeta3.2602-06.cjs.min.js +0 -6
- package/browser/es5/ai.dbg.3.4.0-nightlybeta3.2602-06.cjs.min.js.map +0 -1
- package/browser/es5/ai.dbg.3.4.0-nightlybeta3.2602-06.gbl.js.map +0 -1
- package/browser/es5/ai.dbg.3.4.0-nightlybeta3.2602-06.gbl.min.js +0 -6
- package/browser/es5/ai.dbg.3.4.0-nightlybeta3.2602-06.gbl.min.js.map +0 -1
- package/browser/es5/ai.dbg.3.4.0-nightlybeta3.2602-06.integrity.json +0 -66
- package/browser/es5/ai.dbg.3.4.0-nightlybeta3.2602-06.js.map +0 -1
- package/browser/es5/ai.dbg.3.4.0-nightlybeta3.2602-06.min.js +0 -6
- package/browser/es5/ai.dbg.3.4.0-nightlybeta3.2602-06.min.js.map +0 -1
package/dist-es5/DebugPlugin.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Application Insights JavaScript SDK - Debug Plugin, 3.4.0-nightlybeta3.2602-
|
|
2
|
+
* Application Insights JavaScript SDK - Debug Plugin, 3.4.0-nightlybeta3.2602-11
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
import dynamicProto from "@microsoft/dynamicproto-js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Application Insights JavaScript SDK - Debug Plugin, 3.4.0-nightlybeta3.2602-
|
|
2
|
+
* Application Insights JavaScript SDK - Debug Plugin, 3.4.0-nightlybeta3.2602-11
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
import { isArray, isBoolean, isError, isNumber, isObject, isString, objToString } from "@microsoft/applicationinsights-core-js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/applicationinsights-debugplugin-js",
|
|
3
|
-
"version": "3.4.0-nightlybeta3.2602-
|
|
3
|
+
"version": "3.4.0-nightlybeta3.2602-11",
|
|
4
4
|
"description": "Microsoft Application Insights JavaScript SDK - Debug Plugin extension",
|
|
5
5
|
"homepage": "https://github.com/microsoft/ApplicationInsights-JS#readme",
|
|
6
6
|
"author": "Microsoft Application Insights Team",
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
"@microsoft/api-extractor": "^7.40.0",
|
|
34
34
|
"typescript": "^4.9.3",
|
|
35
35
|
"tslib": "^2.0.0",
|
|
36
|
-
"grunt": "^1.
|
|
37
|
-
"grunt-cli": "^1.
|
|
38
|
-
"@nevware21/grunt-ts-plugin": "^0.
|
|
39
|
-
"@nevware21/grunt-eslint-ts": "^0.
|
|
36
|
+
"grunt": "^1.6.1",
|
|
37
|
+
"grunt-cli": "^1.5.0",
|
|
38
|
+
"@nevware21/grunt-ts-plugin": "^0.5.1",
|
|
39
|
+
"@nevware21/grunt-eslint-ts": "^0.5.1",
|
|
40
40
|
"globby": "^11.0.0",
|
|
41
41
|
"magic-string": "^0.25.7",
|
|
42
42
|
"@rollup/plugin-commonjs": "^24.0.0",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"@microsoft/dynamicproto-js": "^2.0.3",
|
|
55
|
-
"@microsoft/applicationinsights-core-js": "3.4.0-nightlybeta3.2602-
|
|
55
|
+
"@microsoft/applicationinsights-core-js": "3.4.0-nightlybeta3.2602-11",
|
|
56
56
|
"@microsoft/applicationinsights-shims": "3.0.1",
|
|
57
57
|
"@nevware21/ts-utils": ">= 0.12.6 < 2.x"
|
|
58
58
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Microsoft.ApplicationInsights, 3.4.0-nightlybeta3.2602-
|
|
2
|
+
* Microsoft.ApplicationInsights, 3.4.0-nightlybeta3.2602-11
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* Microsoft Application Insights Team
|
|
@@ -275,7 +275,8 @@ declare namespace ApplicationInsights {
|
|
|
275
275
|
AttributeError = 115,
|
|
276
276
|
SpanError = 116,
|
|
277
277
|
TraceError = 117,
|
|
278
|
-
NotImplementedError = 118
|
|
278
|
+
NotImplementedError = 118,
|
|
279
|
+
VersionMismatch = 119
|
|
279
280
|
}
|
|
280
281
|
|
|
281
282
|
const enum eLoggingSeverity {
|
|
@@ -1282,7 +1283,7 @@ declare namespace ApplicationInsights {
|
|
|
1282
1283
|
/**
|
|
1283
1284
|
* The internal logging queue
|
|
1284
1285
|
*/
|
|
1285
|
-
queue:
|
|
1286
|
+
queue: IInternalLogMessage[];
|
|
1286
1287
|
/**
|
|
1287
1288
|
* This method will throw exceptions in debug mode or attempt to log the error as a console warning.
|
|
1288
1289
|
* @param severity - The severity of the log message
|
|
@@ -1315,7 +1316,7 @@ declare namespace ApplicationInsights {
|
|
|
1315
1316
|
* @param severity - The severity of the log message
|
|
1316
1317
|
* @param message - The message to log.
|
|
1317
1318
|
*/
|
|
1318
|
-
logInternalMessage?(severity: LoggingSeverity, message:
|
|
1319
|
+
logInternalMessage?(severity: LoggingSeverity, message: IInternalLogMessage): void;
|
|
1319
1320
|
/**
|
|
1320
1321
|
* Optional Callback hook to allow the diagnostic logger to update it's configuration
|
|
1321
1322
|
* @param updateState - The new configuration state to apply to the diagnostic logger
|
|
@@ -1336,7 +1337,7 @@ declare namespace ApplicationInsights {
|
|
|
1336
1337
|
readonly dbgMode?: boolean;
|
|
1337
1338
|
}
|
|
1338
1339
|
|
|
1339
|
-
interface IDistributedTraceContext {
|
|
1340
|
+
interface IDistributedTraceContext extends IDistributedTraceInit {
|
|
1340
1341
|
/**
|
|
1341
1342
|
* Returns the current name of the page
|
|
1342
1343
|
*/
|
|
@@ -1472,6 +1473,180 @@ declare namespace ApplicationInsights {
|
|
|
1472
1473
|
readonly parentCtx?: IDistributedTraceContext | null;
|
|
1473
1474
|
}
|
|
1474
1475
|
|
|
1476
|
+
/**
|
|
1477
|
+
* An object that can be used to populate a new {@link IDistributedTraceContext} instance,
|
|
1478
|
+
* the included {@link IW3cTraceState} or {@link IOTelTraceState} is used as the parent of the
|
|
1479
|
+
* created instances traceState
|
|
1480
|
+
*/
|
|
1481
|
+
interface IDistributedTraceInit {
|
|
1482
|
+
/**
|
|
1483
|
+
* The unique identifier for the trace that this span belongs to.
|
|
1484
|
+
*
|
|
1485
|
+
* The trace ID is a globally unique identifier that connects all spans within a single
|
|
1486
|
+
* distributed trace. It consists of 16 randomly generated bytes encoded as 32 lowercase
|
|
1487
|
+
* hexadecimal characters, providing 128 bits of entropy to ensure worldwide uniqueness
|
|
1488
|
+
* with practically sufficient probability.
|
|
1489
|
+
*
|
|
1490
|
+
* @remarks
|
|
1491
|
+
* - Must be exactly 32 lowercase hexadecimal characters
|
|
1492
|
+
* - Represents 128 bits (16 bytes) of random data
|
|
1493
|
+
* - Shared by all spans within the same trace
|
|
1494
|
+
* - Used for trace correlation across distributed systems
|
|
1495
|
+
* - Should never be all zeros (invalid trace ID)
|
|
1496
|
+
*
|
|
1497
|
+
* @example
|
|
1498
|
+
* ```typescript
|
|
1499
|
+
* // Example trace ID format
|
|
1500
|
+
* const traceId = "4bf92f3577b34da6a3ce929d0e0e4736";
|
|
1501
|
+
*
|
|
1502
|
+
* // All spans in the same trace share this ID
|
|
1503
|
+
* console.log(parentSpan.spanContext().traceId === childSpan.spanContext().traceId); // true
|
|
1504
|
+
* ```
|
|
1505
|
+
*/
|
|
1506
|
+
traceId: string;
|
|
1507
|
+
/**
|
|
1508
|
+
* The unique identifier for this specific span within the trace.
|
|
1509
|
+
*
|
|
1510
|
+
* The span ID uniquely identifies this span within the trace and is used to establish
|
|
1511
|
+
* parent-child relationships between spans. It consists of 8 randomly generated bytes
|
|
1512
|
+
* encoded as 16 lowercase hexadecimal characters, providing 64 bits of entropy to
|
|
1513
|
+
* ensure global uniqueness with practically sufficient probability.
|
|
1514
|
+
*
|
|
1515
|
+
* @remarks
|
|
1516
|
+
* - Must be exactly 16 lowercase hexadecimal characters
|
|
1517
|
+
* - Represents 64 bits (8 bytes) of random data
|
|
1518
|
+
* - Unique within the trace (different spans have different span IDs)
|
|
1519
|
+
* - Used as parent ID when creating child spans
|
|
1520
|
+
* - Should never be all zeros (invalid span ID)
|
|
1521
|
+
*
|
|
1522
|
+
* @example
|
|
1523
|
+
* ```typescript
|
|
1524
|
+
* // Example span ID format
|
|
1525
|
+
* const spanId = "00f067aa0ba902b7";
|
|
1526
|
+
*
|
|
1527
|
+
* // Each span has a unique ID within the trace
|
|
1528
|
+
* const parentId = parentSpan.spanContext().spanId; // "00f067aa0ba902b7"
|
|
1529
|
+
* const childId = childSpan.spanContext().spanId; // "b9c7c989f97918e1"
|
|
1530
|
+
*
|
|
1531
|
+
* // Child span uses parent's span ID as its parent ID
|
|
1532
|
+
* console.log(childSpan.parentSpanId === parentId); // true
|
|
1533
|
+
* ```
|
|
1534
|
+
*/
|
|
1535
|
+
spanId: string;
|
|
1536
|
+
/**
|
|
1537
|
+
* Indicates whether this span context was propagated from a remote parent span.
|
|
1538
|
+
*
|
|
1539
|
+
* This flag distinguishes between spans created locally within the same process
|
|
1540
|
+
* and spans that represent operations in remote services. Remote spans are typically
|
|
1541
|
+
* created when trace context is received via HTTP headers, message queues, or other
|
|
1542
|
+
* inter-process communication mechanisms.
|
|
1543
|
+
*
|
|
1544
|
+
* @defaultValue false - spans are considered local unless explicitly marked as remote
|
|
1545
|
+
*
|
|
1546
|
+
* @remarks
|
|
1547
|
+
* - True only when span context was received from another process/service
|
|
1548
|
+
* - Helps distinguish local vs. distributed trace segments
|
|
1549
|
+
* - Used by tracing systems for visualization and analysis
|
|
1550
|
+
* - Local child spans of remote parents are NOT considered remote themselves
|
|
1551
|
+
*
|
|
1552
|
+
* @example
|
|
1553
|
+
* ```typescript
|
|
1554
|
+
* // HTTP service receiving trace context
|
|
1555
|
+
* const incomingSpanContext = extractSpanContextFromHeaders(request.headers);
|
|
1556
|
+
* console.log(incomingSpanContext.isRemote); // true
|
|
1557
|
+
*
|
|
1558
|
+
* // Child span created locally
|
|
1559
|
+
* const localChild = tracer.startSpan('local-operation', {
|
|
1560
|
+
* parent: incomingSpanContext
|
|
1561
|
+
* });
|
|
1562
|
+
* console.log(localChild.spanContext().isRemote); // false
|
|
1563
|
+
* ```
|
|
1564
|
+
*/
|
|
1565
|
+
isRemote?: boolean;
|
|
1566
|
+
/**
|
|
1567
|
+
* Trace flags that control trace behavior and indicate sampling decisions.
|
|
1568
|
+
*
|
|
1569
|
+
* The trace flags are represented as a single byte (8-bit bitmap) that carries
|
|
1570
|
+
* trace-level information. The least significant bit (0x01) indicates whether
|
|
1571
|
+
* the trace is sampled. When this bit is set, it documents that the caller
|
|
1572
|
+
* may have recorded trace data. Additional bits are reserved for future use
|
|
1573
|
+
* and should be ignored when not understood.
|
|
1574
|
+
*
|
|
1575
|
+
* @remarks
|
|
1576
|
+
* - Represented as a number (0-255) corresponding to 8 bits
|
|
1577
|
+
* - Bit 0 (0x01): Sampled flag - indicates trace may contain recorded data
|
|
1578
|
+
* - Bits 1-7: Reserved for future use, should be preserved during propagation
|
|
1579
|
+
* - Used by sampling algorithms to make consistent decisions across services
|
|
1580
|
+
* - See {@link eW3CTraceFlags} for standard flag values
|
|
1581
|
+
*
|
|
1582
|
+
* @example
|
|
1583
|
+
* ```typescript
|
|
1584
|
+
* // Check if trace is sampled
|
|
1585
|
+
* const isSampled = (spanContext.traceFlags & 0x01) === 1;
|
|
1586
|
+
*
|
|
1587
|
+
* // Common flag values
|
|
1588
|
+
* const UNSAMPLED = 0x00; // 00000000 - not sampled
|
|
1589
|
+
* const SAMPLED = 0x01; // 00000001 - sampled
|
|
1590
|
+
*
|
|
1591
|
+
* // Preserving unknown flags during propagation
|
|
1592
|
+
* const preservedFlags = spanContext.traceFlags | 0x01; // Set sampled bit while preserving others
|
|
1593
|
+
*
|
|
1594
|
+
* // W3C traceparent header format includes these flags
|
|
1595
|
+
* const traceparent = `00-${traceId}-${spanId}-${traceFlags.toString(16).padStart(2, '0')}`;
|
|
1596
|
+
* ```
|
|
1597
|
+
*/
|
|
1598
|
+
traceFlags?: number;
|
|
1599
|
+
/**
|
|
1600
|
+
* Vendor-specific trace state information for cross-system trace correlation.
|
|
1601
|
+
*
|
|
1602
|
+
* The trace state carries tracing-system-specific context in a standardized format
|
|
1603
|
+
* defined by the W3C Trace Context specification. It allows multiple tracing systems
|
|
1604
|
+
* to participate in the same trace by providing a mechanism for each system to add
|
|
1605
|
+
* its own metadata without interfering with others.
|
|
1606
|
+
*
|
|
1607
|
+
* The trace state is formatted as a comma-separated list of key-value pairs, where
|
|
1608
|
+
* each pair represents one tracing system's contribution. Keys should be unique
|
|
1609
|
+
* within the trace state and follow specific naming conventions.
|
|
1610
|
+
*
|
|
1611
|
+
* @remarks
|
|
1612
|
+
* - Maximum of 32 list members allowed
|
|
1613
|
+
* - Each member format: `key=value` separated by commas
|
|
1614
|
+
* - Keys should be namespaced to avoid conflicts (e.g., `vendor@system=value`)
|
|
1615
|
+
* - Total size should not exceed 512 characters for practical header limits
|
|
1616
|
+
* - Spaces around list members are ignored
|
|
1617
|
+
* - Preserves vendor-specific information during trace propagation
|
|
1618
|
+
*
|
|
1619
|
+
* @see {@link https://www.w3.org/TR/trace-context/#tracestate-field | W3C Trace Context Specification}
|
|
1620
|
+
*
|
|
1621
|
+
* @example
|
|
1622
|
+
* ```typescript
|
|
1623
|
+
* // Single tracing system
|
|
1624
|
+
* const singleVendor = {
|
|
1625
|
+
* get: (key: string) => key === 'rojo' ? '00f067aa0ba902b7' : undefined,
|
|
1626
|
+
* set: (key: string, value: string) => { ... },
|
|
1627
|
+
* unset: (key: string) => { ... },
|
|
1628
|
+
* serialize: () => 'rojo=00f067aa0ba902b7'
|
|
1629
|
+
* };
|
|
1630
|
+
*
|
|
1631
|
+
* // Multiple tracing systems
|
|
1632
|
+
* const multiVendor = {
|
|
1633
|
+
* serialize: () => 'rojo=00f067aa0ba902b7,congo=t61rcWkgMzE,vendor@system=custom-value'
|
|
1634
|
+
* };
|
|
1635
|
+
*
|
|
1636
|
+
* // Accessing trace state
|
|
1637
|
+
* const rojoValue = spanContext.traceState?.get('rojo');
|
|
1638
|
+
* const serialized = spanContext.traceState?.serialize();
|
|
1639
|
+
*
|
|
1640
|
+
* // HTTP header format (When the traceState is an IOTelTraceState)
|
|
1641
|
+
* headers['tracestate'] = spanContext.traceState?.serialize() || '';
|
|
1642
|
+
*
|
|
1643
|
+
* // HTTP header format (When the traceState is an IW3cTraceState)
|
|
1644
|
+
* headers['tracestate'] = spanContext.traceState?.hdrs()[0] || '';
|
|
1645
|
+
* ```
|
|
1646
|
+
*/
|
|
1647
|
+
traceState?: IW3cTraceState | IOTelTraceState;
|
|
1648
|
+
}
|
|
1649
|
+
|
|
1475
1650
|
/**
|
|
1476
1651
|
* Configuration for extra exceptions information sent with the exception telemetry.
|
|
1477
1652
|
* @example
|
|
@@ -1557,6 +1732,11 @@ declare namespace ApplicationInsights {
|
|
|
1557
1732
|
blockCdnCfg?: boolean;
|
|
1558
1733
|
}
|
|
1559
1734
|
|
|
1735
|
+
interface IInternalLogMessage {
|
|
1736
|
+
message: string;
|
|
1737
|
+
messageId: _InternalMessageId;
|
|
1738
|
+
}
|
|
1739
|
+
|
|
1560
1740
|
/**
|
|
1561
1741
|
* Internal Interface
|
|
1562
1742
|
*/
|
|
@@ -1756,13 +1936,6 @@ declare namespace ApplicationInsights {
|
|
|
1756
1936
|
offlineBatchDrop?(cnt: number, reason?: number): void;
|
|
1757
1937
|
}
|
|
1758
1938
|
|
|
1759
|
-
class _InternalLogMessage {
|
|
1760
|
-
static dataType: string;
|
|
1761
|
-
message: string;
|
|
1762
|
-
messageId: _InternalMessageId;
|
|
1763
|
-
constructor(msgId: _InternalMessageId, msg: string, isUserAct?: boolean, properties?: Object);
|
|
1764
|
-
}
|
|
1765
|
-
|
|
1766
1939
|
type _InternalMessageId = number | _eInternalMessageId;
|
|
1767
1940
|
|
|
1768
1941
|
/**
|
|
@@ -2532,7 +2705,26 @@ declare namespace ApplicationInsights {
|
|
|
2532
2705
|
}
|
|
2533
2706
|
|
|
2534
2707
|
/**
|
|
2535
|
-
*
|
|
2708
|
+
* A SpanContext represents the portion of a {@link IOTelSpan} which must be
|
|
2709
|
+
* serialized and propagated along side of a {@link IOTelBaggage}.
|
|
2710
|
+
*/
|
|
2711
|
+
interface IOTelSpanContext extends IDistributedTraceInit {
|
|
2712
|
+
/**
|
|
2713
|
+
* Trace flags to propagate.
|
|
2714
|
+
*
|
|
2715
|
+
* It is represented as 1 byte (bitmap). Bit to represent whether trace is
|
|
2716
|
+
* sampled or not. When set, the least significant bit documents that the
|
|
2717
|
+
* caller may have recorded trace data. A caller who does not record trace
|
|
2718
|
+
* data out-of-band leaves this flag unset.
|
|
2719
|
+
*
|
|
2720
|
+
* see {@link eW3CTraceFlags} for valid flag values.
|
|
2721
|
+
*/
|
|
2722
|
+
traceFlags: number;
|
|
2723
|
+
}
|
|
2724
|
+
|
|
2725
|
+
/**
|
|
2726
|
+
* Provides an OpenTelemetry like Interface for the Open Telemetry Api (1.9.0) SpanOptions
|
|
2727
|
+
* type. Where SpanOptions are options that can be used to configure a span.
|
|
2536
2728
|
*/
|
|
2537
2729
|
interface IOTelSpanOptions {
|
|
2538
2730
|
/**
|
|
@@ -2608,7 +2800,6 @@ declare namespace ApplicationInsights {
|
|
|
2608
2800
|
*
|
|
2609
2801
|
* @param name - The name of the span, should be descriptive of the operation being traced
|
|
2610
2802
|
* @param options - Optional configuration for span creation (parent context, attributes, etc.)
|
|
2611
|
-
* @param context - Optional context to use for extracting the parent span; if not provided, uses current context
|
|
2612
2803
|
*
|
|
2613
2804
|
* @returns The newly created span, or null if span creation failed
|
|
2614
2805
|
*
|
|
@@ -2744,6 +2935,63 @@ declare namespace ApplicationInsights {
|
|
|
2744
2935
|
shutdown?: () => IPromise<void> | void;
|
|
2745
2936
|
}
|
|
2746
2937
|
|
|
2938
|
+
/**
|
|
2939
|
+
* Provides an OpenTelemetry compatible Interface for the Open Telemetry Api (1.9.0) TraceState type.
|
|
2940
|
+
*
|
|
2941
|
+
* The TraceState is a list of key/value pairs that are used to propagate
|
|
2942
|
+
* vendor-specific trace information across different distributed tracing systems.
|
|
2943
|
+
* The TraceState is used to store the state of a trace across different
|
|
2944
|
+
* distributed tracing systems, and it is used to ensure that the trace information
|
|
2945
|
+
* is consistent across different systems.
|
|
2946
|
+
*
|
|
2947
|
+
* Instances of TraceState are immutable, and the methods on this interface
|
|
2948
|
+
* return a new instance of TraceState with the updated values.
|
|
2949
|
+
*/
|
|
2950
|
+
interface IOTelTraceState {
|
|
2951
|
+
/**
|
|
2952
|
+
* Create a new TraceState which inherits from this TraceState and has the
|
|
2953
|
+
* given key set.
|
|
2954
|
+
* The new entry will always be added in the front of the list of states.
|
|
2955
|
+
*
|
|
2956
|
+
* @param key - key of the TraceState entry.
|
|
2957
|
+
* @param value - value of the TraceState entry.
|
|
2958
|
+
*/
|
|
2959
|
+
set(key: string, value: string): IOTelTraceState;
|
|
2960
|
+
/**
|
|
2961
|
+
* Return a new TraceState which inherits from this TraceState but does not
|
|
2962
|
+
* contain the given key.
|
|
2963
|
+
*
|
|
2964
|
+
* @param key - the key for the TraceState entry to be removed.
|
|
2965
|
+
*/
|
|
2966
|
+
unset(key: string): IOTelTraceState;
|
|
2967
|
+
/**
|
|
2968
|
+
* Returns the value to which the specified key is mapped, or `undefined` if
|
|
2969
|
+
* this map contains no mapping for the key.
|
|
2970
|
+
*
|
|
2971
|
+
* @param key - with which the specified value is to be associated.
|
|
2972
|
+
* @returns the value to which the specified key is mapped, or `undefined` if
|
|
2973
|
+
* this map contains no mapping for the key.
|
|
2974
|
+
*/
|
|
2975
|
+
get(key: string): string | undefined;
|
|
2976
|
+
/**
|
|
2977
|
+
* Serializes the TraceState to a `list` as defined below. The `list` is a series of `list-members`
|
|
2978
|
+
* separated by commas `,`, and a list-member is a key/value pair separated by an equals sign `=`.
|
|
2979
|
+
* Spaces and horizontal tabs surrounding `list-members` are ignored. There can be a maximum of 32
|
|
2980
|
+
* `list-members` in a `list`.
|
|
2981
|
+
*
|
|
2982
|
+
* If the resulting serialization is limited to no longer than 512 bytes, if the combination of
|
|
2983
|
+
* keys and values exceeds this limit, the serialization will be truncated to the last key/value pair
|
|
2984
|
+
* that fits within the limit. The serialization will be returned as a string.
|
|
2985
|
+
*
|
|
2986
|
+
* This is different from the {@link IW3cTraceState} serialization which returns an array of strings where each
|
|
2987
|
+
* string is limited to 512 bytes and the array is limited to 32 strings. Thus the OpenTelemetry serialization
|
|
2988
|
+
* will only return the first single string that fits within the limie.
|
|
2989
|
+
*
|
|
2990
|
+
* @returns the serialized string.
|
|
2991
|
+
*/
|
|
2992
|
+
serialize(): string;
|
|
2993
|
+
}
|
|
2994
|
+
|
|
2747
2995
|
/** IPayloadData describes interface of payload sent via POST channel */
|
|
2748
2996
|
interface IPayloadData {
|
|
2749
2997
|
urlString: string;
|
|
@@ -3490,12 +3738,12 @@ declare namespace ApplicationInsights {
|
|
|
3490
3738
|
* @param spanContext - The {@link IDistributedTraceContext} to be wrapped
|
|
3491
3739
|
* @returns a new non-recording {@link IReadableSpan} with the provided context
|
|
3492
3740
|
*/
|
|
3493
|
-
wrapSpanContext(spanContext: IDistributedTraceContext): IReadableSpan;
|
|
3741
|
+
wrapSpanContext(spanContext: IDistributedTraceContext | IDistributedTraceInit | IOTelSpanContext): IReadableSpan;
|
|
3494
3742
|
/**
|
|
3495
3743
|
* Returns true if this {@link IDistributedTraceContext} is valid.
|
|
3496
3744
|
* @return true if this {@link IDistributedTraceContext} is valid.
|
|
3497
3745
|
*/
|
|
3498
|
-
isSpanContextValid(spanContext: IDistributedTraceContext): boolean;
|
|
3746
|
+
isSpanContextValid(spanContext: IDistributedTraceContext | IDistributedTraceInit | IOTelSpanContext): boolean;
|
|
3499
3747
|
/**
|
|
3500
3748
|
* Gets the span from the current context, if one exists.
|
|
3501
3749
|
*/
|