Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@aspecto/opentelemetry-instrumentation-mongodb
Advanced tools
Aspecto fork of OpenTelemetry mongodb automatic instrumentation package.
This is a fork of the instrumentation, to add features required by aspecto until they are merged into the main repo and published.
This module provides automatic instrumentation for mongodb
.
For automatic instrumentation see the @opentelemetry/sdk-trace-node package.
npm install --save @opentelemetry/instrumentation-mongodb
'>=3.3 <4
OpenTelemetry Mongodb Instrumentation allows the user to automatically collect trace data and export them to their backend of choice, to give observability to distributed systems.
To load a specific instrumentation (mongodb in this case), specify it in the Node Tracer's configuration.
const { NodeTracerProvider } = require('@opentelemetry/sdk-trace-node');
const { MongoDBInstrumentation } = require('@opentelemetry/instrumentation-mongodb');
const provider = new NodeTracerProvider();
provider.addSpanProcessor(new SimpleSpanProcessor(new ConsoleSpanExporter()));
provider.register();
const mongodbInstrumentation = new MongoDBInstrumentation({
// see under for available configuration
});
Mongodb instrumentation has few options available to choose from. You can set the following:
Options | Type | Description |
---|---|---|
dbStatementSerializer | DbStatementSerializer | Mongodb instrumentation will serialize db.statement using the specified function. |
responseHook | MongoDbResponseCustomAttributesFunction | Hook called before response is returned, which allows to add custom attributes to span. |
moduleVersionAttributeName | string | If passed, a span attribute will be added to all spans with key of the provided moduleVersionAttributeName and value of the patched module version. |
requireParentSpan | boolean | Require parent to create mongodb span, default when unset is true |
ignoreIsMasterCommand | boolean | If true, a span for periodical isMaster command will not be generated, default when unset is false. The mongodb client library periodically re-run the isMaster command to detect the replica set configuration changes. |
aggregateGetMoreOperations | boolean | If true, a span for a getMore command will not be generated, default when unset is false. |
aggregateGetMoreResponseHook | MongoDbGetMoreResponseAggregateFunction | Hook for aggregate a response payload of a GetMore operation, allows to add custom attributes to span. |
Apache 2.0 - See LICENSE for more information.
0.2.0
Released 2019-11-04
opentelemetry-shim-opentracing
, opentelemetry-tracing
, opentelemetry-types
opentelemetry-core
, opentelemetry-node
, opentelemetry-tracing
, opentelemetry-types
opentelemetry-metrics
opentelemetry-plugin-document-load
opentelemetry-core
, opentelemetry-plugin-document-load
, opentelemetry-tracing
, opentelemetry-web
opentelemetry-tracing
opentelemetry-core
opentelemetry-metrics
, opentelemetry-types
opentelemetry-metrics
opentelemetry-plugin-postgres
opentelemetry-core
, opentelemetry-types
opentelemetry-core
, opentelemetry-plugin-document-load
, opentelemetry-tracing
, opentelemetry-types
, opentelemetry-web
FAQs
Aspecto fork of OpenTelemetry mongodb automatic instrumentation package.
The npm package @aspecto/opentelemetry-instrumentation-mongodb receives a total of 904 weekly downloads. As such, @aspecto/opentelemetry-instrumentation-mongodb popularity was classified as not popular.
We found that @aspecto/opentelemetry-instrumentation-mongodb demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 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.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.