Compare commits

...

1 Commits

Author SHA1 Message Date
Anurag Mittal 665f9d9591
S3C-8823: add Otel SDK setup with honeycomb 2024-05-27 09:18:03 +02:00
3 changed files with 1619 additions and 6 deletions

View File

@ -20,6 +20,10 @@
"homepage": "https://github.com/scality/S3#readme",
"dependencies": {
"@hapi/joi": "^17.1.0",
"@honeycombio/opentelemetry-node": "^0.7.2",
"@opentelemetry/api": "^1.8.0",
"@opentelemetry/auto-instrumentations-node": "^0.46.1",
"@opentelemetry/instrumentation-aws-sdk": "^0.41.0",
"arsenal": "git+https://github.com/scality/arsenal#7.70.29",
"async": "~2.5.0",
"aws-sdk": "2.905.0",
@ -84,7 +88,7 @@
"start": "npm-run-all --parallel start_dmd start_s3server",
"start_mdserver": "node mdserver.js",
"start_dataserver": "node dataserver.js",
"start_s3server": "node index.js",
"start_s3server": "node -r ./tracing.js index.js",
"start_dmd": "npm-run-all --parallel start_mdserver start_dataserver",
"start_utapi": "node lib/utapi/utapi.js",
"utapi_replay": "node lib/utapi/utapiReplay.js",

25
tracing.js Normal file
View File

@ -0,0 +1,25 @@
// Example filename: tracing.js
'use strict';
const { HoneycombSDK } = require('@honeycombio/opentelemetry-node');
const {
getNodeAutoInstrumentations,
} = require('@opentelemetry/auto-instrumentations-node');
const { IORedisInstrumentation } = require('@opentelemetry/instrumentation-ioredis');
// Uses environment variables named HONEYCOMB_API_KEY and OTEL_SERVICE_NAME
const sdk = new HoneycombSDK({
instrumentations: [getNodeAutoInstrumentations({
// We recommend disabling fs automatic instrumentation because
// it can be noisy and expensive during startup
'@opentelemetry/instrumentation-fs': {
enabled: false,
},
}),
new IORedisInstrumentation(),
],
});
sdk.start();

1594
yarn.lock

File diff suppressed because it is too large Load Diff