Name of the instrumentation scope (e.g., library name)
Version of the instrumentation scope (defaults to empty string)
Additional attributes for the scope (defaults to empty object)
A complete InstrumentationScope object
// Basic scope
const basicScope = createInstrumentationScope("turtle-mining-lib");
// Result: { name: "turtle-mining-lib", version: "", attributes: [], droppedAttributesCount: 0 }
// Scope with version
const versionedScope = createInstrumentationScope("turtle-mining-lib", "2.1.0");
// Scope with attributes
const detailedScope = createInstrumentationScope(
"turtle-mining-lib",
"2.1.0",
{
"library.type": "automation",
"library.language": "typescript"
}
);
🔬 Create an InstrumentationScope.
Creates an OpenTelemetry instrumentation scope with the given parameters. This identifies the library or module that generated the telemetry data.