@azure/opentelemetry-instrumentation-azure-sdk 1.0.0-alpha.20250407.1 → 1.0.0-alpha.20250421.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/README.md CHANGED
@@ -45,6 +45,7 @@ import { registerInstrumentations } from "@opentelemetry/instrumentation";
45
45
  import { createAzureSdkInstrumentation } from "@azure/opentelemetry-instrumentation-azure-sdk";
46
46
  import { KeyClient } from "@azure/keyvault-keys";
47
47
  import { DefaultAzureCredential } from "@azure/identity";
48
+ import { trace, context } from "@opentelemetry/api";
48
49
 
49
50
  // Set-up and configure a Node Tracer Provider using OpenTelemetry SDK.
50
51
  const provider = new NodeTracerProvider();
@@ -67,9 +68,9 @@ await keyClient.getKey("MyKeyName");
67
68
  // If your scenario requires manual span propagation, all Azure client libraries
68
69
  // support explicitly passing a parent context via an `options` parameter.
69
70
  // Get a tracer from a registered provider, create a span, and get the current context.
70
- const tracer = opentelemetry.trace.getTracer("my-tracer");
71
+ const tracer = trace.getTracer("my-tracer");
71
72
  const span = tracer.startSpan("main");
72
- const ctx = opentelemetry.trace.setSpan(opentelemetry.context.active(), span);
73
+ const ctx = trace.setSpan(context.active(), span);
73
74
 
74
75
  await keyClient.getKey("MyKeyName", {
75
76
  tracingOptions: {
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.52.3"
8
+ "packageVersion": "7.52.4"
9
9
  }
10
10
  ]
11
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure/opentelemetry-instrumentation-azure-sdk",
3
- "version": "1.0.0-alpha.20250407.1",
3
+ "version": "1.0.0-alpha.20250421.1",
4
4
  "description": "Instrumentation client for the Azure SDK.",
5
5
  "sdk-type": "client",
6
6
  "type": "module",
@@ -33,7 +33,7 @@
33
33
  "lint": "eslint package.json api-extractor.json README.md src test",
34
34
  "lint:fix": "eslint package.json api-extractor.json README.md src test --fix --fix-type [problem,suggestion]",
35
35
  "pack": "npm pack 2>&1",
36
- "test": "npm run clean && dev-tool run build-package && npm run unit-test:node && dev-tool run bundle && npm run unit-test:browser && npm run integration-test",
36
+ "test": "npm run clean && dev-tool run build-package && npm run unit-test:node && npm run unit-test:browser && npm run integration-test",
37
37
  "test:browser": "npm run clean && npm run build:test && npm run unit-test:browser && npm run integration-test:browser",
38
38
  "test:node": "npm run clean && dev-tool run build-package && npm run unit-test:node && npm run integration-test:node",
39
39
  "unit-test": "npm run unit-test:node && npm run unit-test:browser",