Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
opentelemetry-instrumentation-elasticsearch
Advanced tools
open telemetry instrumentation for the `elasticsearch` module
This module provides automatic instrumentation for @elastic/elasticsearch
and follows otel DB Semantic Conventions.
npm install opentelemetry-instrumentation-elasticsearch
For further automatic instrumentation instruction see the @opentelemetry/instrumentation package.
const { NodeTracerProvider } = require('@opentelemetry/node');
const { registerInstrumentations } = require('@opentelemetry/instrumentation');
const { ElasticsearchInstrumentation } = require('opentelemetry-instrumentation-elasticsearch');
registerInstrumentations({
traceProvider,
instrumentations: [
new ElasticsearchInstrumentation({
// see under for available configuration
})
]
});
Elasticsearch instrumentation has few options available to choose from. You can set the following (all optional):
Options | Type | Description |
---|---|---|
suppressInternalInstrumentation | boolean | Elasticsearch operation use http/https under the hood. Setting this to true will hide the underlying request spans (if instrumented). |
responseHook | ElasticsearchResponseCustomAttributesFunction | Hook called before response is returned, which allows to add custom attributes to span. |
dbStatementSerializer | DbStatementSerializer | Elasticsearch instrumentation will serialize db.statement using the specified function. |
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 |
Please make sure dbStatementSerializer
is error proof, as errors are not handled while executing this function.
This extension (and many others) was developed by Aspecto with ❤️
FAQs
open telemetry instrumentation for the `elasticsearch` module
The npm package opentelemetry-instrumentation-elasticsearch receives a total of 26,244 weekly downloads. As such, opentelemetry-instrumentation-elasticsearch popularity was classified as popular.
We found that opentelemetry-instrumentation-elasticsearch 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.