
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
@azure/opentelemetry-instrumentation-azure-sdk
Advanced tools
Instrumentation client for the Azure SDK.
See our support policy for more details.
You'll need to configure the OpenTelemetry SDK in order to produce Telemetry data. While configuring OpenTelemetry is outside the scope of this README, we encourage you to review the OpenTelemetry documentation in order to get started using OpenTelemetry.
@azure/opentelemetry-instrumentation-azure-sdk packageInstall the Azure OpenTelemetry Instrumentation client library with npm:
npm install @azure/opentelemetry-instrumentation-azure-sdk
To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our bundling documentation.
import { NodeTracerProvider } from "@opentelemetry/sdk-trace-node";
import { SimpleSpanProcessor, ConsoleSpanExporter } from "@opentelemetry/tracing";
import { registerInstrumentations } from "@opentelemetry/instrumentation";
import { createAzureSdkInstrumentation } from "@azure/opentelemetry-instrumentation-azure-sdk";
import { KeyClient } from "@azure/keyvault-keys";
import { DefaultAzureCredential } from "@azure/identity";
import { trace, context } from "@opentelemetry/api";
// Set-up and configure a Node Tracer Provider using OpenTelemetry SDK.
const provider = new NodeTracerProvider();
provider.addSpanProcessor(new SimpleSpanProcessor(new ConsoleSpanExporter()));
provider.register();
registerInstrumentations({
instrumentations: [createAzureSdkInstrumentation()],
});
// Continue to import any Azure SDK client libraries after registering the instrumentation.
// import { KeyClient } from "@azure/keyvault-keys";
// import { DefaultAzureCredential } from "@azure/identity";
const keyClient = new KeyClient("https://my.keyvault.azure.net", new DefaultAzureCredential());
// Tracing is now enabled using automatic span propagation with an active context.
await keyClient.getKey("MyKeyName");
// If your scenario requires manual span propagation, all Azure client libraries
// support explicitly passing a parent context via an `options` parameter.
// Get a tracer from a registered provider, create a span, and get the current context.
const tracer = trace.getTracer("my-tracer");
const span = tracer.startSpan("main");
const ctx = trace.setSpan(context.active(), span);
await keyClient.getKey("MyKeyName", {
tracingOptions: {
// ctx will be used as the parent context for all operations.
tracingContext: ctx,
},
});
Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the AZURE_LOG_LEVEL environment variable to info. Alternatively, logging can be enabled at runtime by calling setLogLevel in the @azure/logger:
import { setLogLevel } from "@azure/logger";
setLogLevel("info");
For more detailed instructions on how to enable logs, you can look at the @azure/logger package docs.
This package utilizes @opentelemetry/instrumentation to setup the necessary hooks and loaders. Please refer to @opentelemetry/instrumentation's README for instructions on configuring tracing for ESM packages.
If you'd like to contribute to this library, please read the contributing guide to learn more about how to build and test the code.
FAQs
Instrumentation client for the Azure SDK.
The npm package @azure/opentelemetry-instrumentation-azure-sdk receives a total of 978,732 weekly downloads. As such, @azure/opentelemetry-instrumentation-azure-sdk popularity was classified as popular.
We found that @azure/opentelemetry-instrumentation-azure-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.