@launchdarkly/o11y 1.3.0 → 1.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/CHANGELOG.md +7 -0
- package/dist/{LDObserve-CHIjcqIn.js → LDObserve-DhF3vCDR.js} +2 -2
- package/dist/{LDObserve-CHIjcqIn.js.map → LDObserve-DhF3vCDR.js.map} +1 -1
- package/dist/LDObserve.d.ts +5 -0
- package/dist/LDObserve.js +2 -2
- package/dist/LDRecord.d.ts +5 -0
- package/dist/LDRecord.js +1 -1
- package/dist/assets/highlight-client-worker-DrDPRCrv.js.map +1 -0
- package/dist/buffer-BjzLorpP.js +124 -0
- package/dist/buffer-BjzLorpP.js.map +1 -0
- package/dist/{common-BkAGcE30.js → common-BjaGmQrE.js} +367 -360
- package/dist/{common-BkAGcE30.js.map → common-BjaGmQrE.js.map} +1 -1
- package/dist/index.d.ts +23 -0
- package/dist/index.js +260 -258
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +113 -113
- package/dist/index.umd.js.map +1 -1
- package/dist/{observe-xxoYHNEh.js → observe-D78YYNE1.js} +2362 -2338
- package/dist/observe-D78YYNE1.js.map +1 -0
- package/dist/observe.d.ts +9 -0
- package/dist/observe.js +4 -4
- package/dist/{record-DTawahUk.js → record-BZHDLKsW.js} +1713 -1709
- package/dist/{record-DTawahUk.js.map → record-BZHDLKsW.js.map} +1 -1
- package/dist/record.d.ts +23 -0
- package/dist/record.js +3 -3
- package/package.json +1 -1
- package/dist/assets/highlight-client-worker-DsbKMpxq.js.map +0 -1
- package/dist/buffer-DIFxvF2Q.js +0 -102
- package/dist/buffer-DIFxvF2Q.js.map +0 -1
- package/dist/observe-xxoYHNEh.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.3.1](https://github.com/launchdarkly/observability-sdk/compare/o11y-1.3.0...o11y-1.3.1) (2026-10-21)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **o11y:** keep LaunchDarkly SDK and SDK-internal output out of customer logs ([#835](https://github.com/launchdarkly/observability-sdk/issues/835)) ([fef617d](https://github.com/launchdarkly/observability-sdk/commit/fef617df3c44db9b0d04a833f82dc77c6af7e764))
|
|
9
|
+
|
|
3
10
|
## [1.3.0](https://github.com/launchdarkly/observability-sdk/compare/o11y-1.2.0...o11y-1.3.0) (2026-10-15)
|
|
4
11
|
|
|
5
12
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as f } from "./buffer-
|
|
1
|
+
import { B as f } from "./buffer-BjzLorpP.js";
|
|
2
2
|
const i = () => {
|
|
3
3
|
const t = {
|
|
4
4
|
end: () => {
|
|
@@ -89,4 +89,4 @@ export {
|
|
|
89
89
|
u as L,
|
|
90
90
|
i as g
|
|
91
91
|
};
|
|
92
|
-
//# sourceMappingURL=LDObserve-
|
|
92
|
+
//# sourceMappingURL=LDObserve-DhF3vCDR.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LDObserve-
|
|
1
|
+
{"version":3,"file":"LDObserve-DhF3vCDR.js","sources":["../src/client/otel/utils.ts","../src/sdk/LDObserve.ts"],"sourcesContent":["import {\n\tAttributes,\n\tAttributeValue,\n\tLink,\n\tSpan,\n\tSpanStatus,\n\tTimeInput,\n} from '@opentelemetry/api'\n\nexport const getNoopSpan = () => {\n\tconst noopSpan: Span = {\n\t\tend: () => {},\n\t\tspanContext: () => ({\n\t\t\ttraceId: '',\n\t\t\tspanId: '',\n\t\t\ttraceFlags: 0,\n\t\t}),\n\t\tsetAttribute: (_key: string, _value: AttributeValue) => noopSpan,\n\t\tsetAttributes: (_attributes: Attributes) => noopSpan,\n\t\taddEvent: (\n\t\t\t_name: string,\n\t\t\t_attributesOrStartTime?: Attributes | TimeInput,\n\t\t\t_startTime?: TimeInput,\n\t\t) => noopSpan,\n\t\taddLinks: (_links: Link[]) => noopSpan,\n\t\tsetStatus: (_status: SpanStatus) => noopSpan,\n\t\trecordException: () => {},\n\t\taddLink: () => noopSpan,\n\t\tupdateName: () => noopSpan,\n\t\tisRecording: () => false,\n\t}\n\n\treturn noopSpan\n}\n","import type { Observe } from '../api/observe'\nimport type { LDClient } from '../integrations/launchdarkly'\nimport type { ErrorMessageType } from '../client/types/shared-types'\nimport type { OTelMetric as Metric } from '../client/types/types'\nimport type { Attributes, Context, Span, SpanOptions } from '@opentelemetry/api'\nimport type { LDPluginEnvironmentMetadata } from '../plugins/plugin'\nimport { BufferedClass } from './buffer'\nimport { getNoopSpan } from '../client/otel/utils'\nimport { ConsoleMethods } from '../client/types/client'\n\n/**\n * Resolves the span callback from whichever argument position it was passed in,\n * matching the overloads `startSpan` and `startManualSpan` accept.\n */\nfunction resolveSpanCallback(\n\toptions: unknown,\n\tcontext: unknown,\n\tfn: unknown,\n): ((span: Span) => any) | undefined {\n\tif (typeof fn === 'function') {\n\t\treturn fn as (span: Span) => any\n\t}\n\tif (typeof context === 'function') {\n\t\treturn context as (span: Span) => any\n\t}\n\tif (typeof options === 'function') {\n\t\treturn options as (span: Span) => any\n\t}\n\treturn undefined\n}\n\nclass _LDObserve extends BufferedClass<Observe> implements Observe {\n\tstart() {\n\t\t// avoid buffering the start call\n\t\treturn this._sdk.start()\n\t}\n\n\tstop() {\n\t\t// avoid buffering the stop call\n\t\treturn this._sdk.stop()\n\t}\n\n\trecordGauge(metric: Metric) {\n\t\treturn this._bufferCall('recordGauge', [metric])\n\t}\n\n\trecordCount(metric: Metric) {\n\t\treturn this._bufferCall('recordCount', [metric])\n\t}\n\n\trecordIncr(metric: Omit<Metric, 'value'>) {\n\t\treturn this._bufferCall('recordIncr', [metric])\n\t}\n\n\trecordHistogram(metric: Metric) {\n\t\treturn this._bufferCall('recordHistogram', [metric])\n\t}\n\n\trecordUpDownCounter(metric: Metric) {\n\t\treturn this._bufferCall('recordUpDownCounter', [metric])\n\t}\n\n\t// The callback holds the caller's own work, so it must never be buffered:\n\t// deferring it would replay that work at an arbitrary later time, or drop it.\n\tstartSpan(\n\t\tname: string,\n\t\toptions: SpanOptions | ((span?: Span) => any),\n\t\tcontext?: Context | ((span?: Span) => any),\n\t\tfn?: (span?: Span) => any,\n\t) {\n\t\tif (!this._isLoaded) {\n\t\t\treturn resolveSpanCallback(options, context, fn)?.(getNoopSpan())\n\t\t}\n\t\treturn this._bufferCall('startSpan', [name, options, context, fn])\n\t}\n\n\tstartManualSpan(\n\t\tname: string,\n\t\toptions: SpanOptions | ((span: Span) => any),\n\t\tcontext?: Context | ((span: Span) => any),\n\t\tfn?: (span: Span) => any,\n\t) {\n\t\tif (!this._isLoaded) {\n\t\t\treturn resolveSpanCallback(options, context, fn)?.(getNoopSpan())\n\t\t}\n\t\treturn this._bufferCall('startManualSpan', [name, options, context, fn])\n\t}\n\n\tregister(\n\t\tclient: LDClient,\n\t\tenvironmentMetadata: LDPluginEnvironmentMetadata,\n\t) {\n\t\treturn this._bufferCall('register', [client, environmentMetadata])\n\t}\n\n\trecordLog(message: any, level: ConsoleMethods, metadata?: Attributes) {\n\t\treturn this._bufferCall('recordLog', [message, level, metadata])\n\t}\n\n\trecordError(\n\t\terror: Error,\n\t\tmessage?: string,\n\t\tpayload?: { [key: string]: string },\n\t\tsource?: string,\n\t\ttype?: ErrorMessageType,\n\t) {\n\t\treturn this._bufferCall('recordError', [\n\t\t\terror,\n\t\t\tmessage,\n\t\t\tpayload,\n\t\t\tsource,\n\t\t\ttype,\n\t\t])\n\t}\n\n\tsetLDContextKeyAttributes(contextKeys: Attributes) {\n\t\treturn this._bufferCall('setLDContextKeyAttributes', [contextKeys])\n\t}\n\n\tgetLDContextKeyAttributes(): Attributes | undefined {\n\t\treturn this._bufferCall('getLDContextKeyAttributes', [])\n\t}\n}\n\ninterface GlobalThis {\n\tLDObserve?: _LDObserve\n}\ndeclare var globalThis: GlobalThis\n\nexport let LDObserve!: _LDObserve\nif (typeof globalThis !== 'undefined') {\n\tif (globalThis.LDObserve) {\n\t\tLDObserve = globalThis.LDObserve\n\t} else {\n\t\tLDObserve = new _LDObserve()\n\t\tglobalThis.LDObserve = LDObserve\n\t}\n} else {\n\tLDObserve = new _LDObserve()\n}\n"],"names":["getNoopSpan","noopSpan","_key","_value","_attributes","_name","_attributesOrStartTime","_startTime","_links","_status","resolveSpanCallback","options","context","fn","_LDObserve","BufferedClass","metric","name","_a","client","environmentMetadata","message","level","metadata","error","payload","source","type","contextKeys","LDObserve"],"mappings":";AASO,MAAMA,IAAc,MAAM;AAChC,QAAMC,IAAiB;AAAA,IACtB,KAAK,MAAM;AAAA,IAAC;AAAA,IACZ,aAAa,OAAO;AAAA,MACnB,SAAS;AAAA,MACT,QAAQ;AAAA,MACR,YAAY;AAAA,IAAA;AAAA,IAEb,cAAc,CAACC,GAAcC,MAA2BF;AAAA,IACxD,eAAe,CAACG,MAA4BH;AAAA,IAC5C,UAAU,CACTI,GACAC,GACAC,MACIN;AAAA,IACL,UAAU,CAACO,MAAmBP;AAAA,IAC9B,WAAW,CAACQ,MAAwBR;AAAA,IACpC,iBAAiB,MAAM;AAAA,IAAC;AAAA,IACxB,SAAS,MAAMA;AAAA,IACf,YAAY,MAAMA;AAAA,IAClB,aAAa,MAAM;AAAA,EAAA;AAGpB,SAAOA;AACR;ACnBA,SAASS,EACRC,GACAC,GACAC,GACoC;AACpC,MAAI,OAAOA,KAAO;AACjB,WAAOA;AAER,MAAI,OAAOD,KAAY;AACtB,WAAOA;AAER,MAAI,OAAOD,KAAY;AACtB,WAAOA;AAGT;AAEA,MAAMG,UAAmBC,EAA0C;AAAA,EAClE,QAAQ;AAEP,WAAO,KAAK,KAAK,MAAA;AAAA,EAClB;AAAA,EAEA,OAAO;AAEN,WAAO,KAAK,KAAK,KAAA;AAAA,EAClB;AAAA,EAEA,YAAYC,GAAgB;AAC3B,WAAO,KAAK,YAAY,eAAe,CAACA,CAAM,CAAC;AAAA,EAChD;AAAA,E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AA,EAEA,4BAAoD;AACnD,WAAO,KAAK,YAAY,6BAA6B,EAAE;AAAA,EACxD;AACD;AAOO,IAAIC;AACP,OAAO,cAAe,cACrB,WAAW,YACdA,IAAY,WAAW,aAEvBA,IAAY,IAAIf,EAAA,GAChB,WAAW,YAAYe,KAGxBA,IAAY,IAAIf,EAAA;"}
|
package/dist/LDObserve.d.ts
CHANGED
|
@@ -203,10 +203,15 @@ declare interface Link {
|
|
|
203
203
|
droppedAttributesCount?: number;
|
|
204
204
|
}
|
|
205
205
|
|
|
206
|
+
/**
|
|
207
|
+
* Per-component debug logger. Like `sdkLog`, its output is SDK-internal: it
|
|
208
|
+
* is written only in debug mode and never captured by the console recorder.
|
|
209
|
+
*/
|
|
206
210
|
declare class Logger {
|
|
207
211
|
debug: boolean | undefined;
|
|
208
212
|
name: string | undefined;
|
|
209
213
|
constructor(debug?: boolean, name?: string);
|
|
214
|
+
private prefix;
|
|
210
215
|
log(...data: any[]): void;
|
|
211
216
|
warn(...data: any[]): void;
|
|
212
217
|
}
|
package/dist/LDObserve.js
CHANGED
package/dist/LDRecord.d.ts
CHANGED
|
@@ -82,10 +82,15 @@ declare class _LDRecord extends BufferedClass<Record_2> implements Record_2 {
|
|
|
82
82
|
register(client: LDClientMin, environmentMetadata: LDPluginEnvironmentMetadata): any;
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
+
/**
|
|
86
|
+
* Per-component debug logger. Like `sdkLog`, its output is SDK-internal: it
|
|
87
|
+
* is written only in debug mode and never captured by the console recorder.
|
|
88
|
+
*/
|
|
85
89
|
declare class Logger {
|
|
86
90
|
debug: boolean | undefined;
|
|
87
91
|
name: string | undefined;
|
|
88
92
|
constructor(debug?: boolean, name?: string);
|
|
93
|
+
private prefix;
|
|
89
94
|
log(...data: any[]): void;
|
|
90
95
|
warn(...data: any[]): void;
|
|
91
96
|
}
|
package/dist/LDRecord.js
CHANGED
|
@@ -14,7 +14,7 @@ var a = (l, e, r) => new Promise((f, d) => {
|
|
|
14
14
|
}, i = (s) => s.done ? f(s.value) : Promise.resolve(s.value).then(h, u);
|
|
15
15
|
i((r = r.apply(l, e)).next());
|
|
16
16
|
});
|
|
17
|
-
import { B as g } from "./buffer-
|
|
17
|
+
import { B as g } from "./buffer-BjzLorpP.js";
|
|
18
18
|
class n extends g {
|
|
19
19
|
getSession() {
|
|
20
20
|
return this._isLoaded ? this._bufferCall("getSession", []) : null;
|