Files
klz-cables.com/.pnpm-store/v10/files/c5/5dc306edac4ec8ef2afe3e3bd36a4a2c75416240befc120d3dd7e2dd997c66556f3937cd700ee7e295085143dbafbcde024cbcd247fd6c72a2b1d2a6b7b9fe
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

58 lines
2.2 KiB
Plaintext

export declare enum SemconvStability {
/** Emit only stable semantic conventions. */
STABLE = 1,
/** Emit only old semantic conventions. */
OLD = 2,
/** Emit both stable and old semantic conventions. */
DUPLICATE = 3
}
type SemConvStabilityNamespace = 'http' | 'messaging' | 'database' | 'k8s' | (string & {});
/**
* Determine the appropriate semconv stability for the given namespace.
*
* This will parse the given string of comma-separated values (often
* `process.env.OTEL_SEMCONV_STABILITY_OPT_IN`) looking for the `${namespace}`
* or `${namespace}/dup` tokens. This is a pattern defined by a number of
* non-normative semconv documents.
*
* For example:
* - namespace 'http': https://opentelemetry.io/docs/specs/semconv/non-normative/http-migration/
* - namespace 'database': https://opentelemetry.io/docs/specs/semconv/non-normative/database-migration/
* - namespace 'k8s': https://opentelemetry.io/docs/specs/semconv/non-normative/k8s-migration/
*
* Usage:
*
* import {SemconvStability, semconvStabilityFromStr} from '@opentelemetry/instrumentation';
*
* export class FooInstrumentation extends InstrumentationBase<FooInstrumentationConfig> {
* private _semconvStability: SemconvStability;
* constructor(config: FooInstrumentationConfig = {}) {
* super('@opentelemetry/instrumentation-foo', VERSION, config);
*
* // When supporting the OTEL_SEMCONV_STABILITY_OPT_IN envvar
* this._semconvStability = semconvStabilityFromStr(
* 'http',
* process.env.OTEL_SEMCONV_STABILITY_OPT_IN
* );
*
* // or when supporting a `semconvStabilityOptIn` config option (e.g. for
* // the web where there are no envvars).
* this._semconvStability = semconvStabilityFromStr(
* 'http',
* config?.semconvStabilityOptIn
* );
* }
* }
*
* // Then, to apply semconv, use the following or similar:
* if (this._semconvStability & SemconvStability.OLD) {
* // ...
* }
* if (this._semconvStability & SemconvStability.STABLE) {
* // ...
* }
*
*/
export declare function semconvStabilityFromStr(namespace: SemConvStabilityNamespace, str: string | undefined): SemconvStability;
export {};
//# sourceMappingURL=semconvStability.d.ts.map