Skip to content

Commit

Permalink
feat: add redi and connect instrumentation (#250)
Browse files Browse the repository at this point in the history
* feat: add redi and connect instrumentation

* chore: add branch to job ci
  • Loading branch information
saidsef authored Feb 15, 2025
1 parent 78fae8b commit 4ddf268
Show file tree
Hide file tree
Showing 4 changed files with 155 additions and 101 deletions.
2 changes: 1 addition & 1 deletion deployment/base/job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ spec:
gitRepo:
directory: "."
repository: "https://github.com/saidsef/tracing-node.git"
revision: "fix-repo-url"
revision: "redis-connect"
22 changes: 13 additions & 9 deletions libs/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,22 @@
* limitations under the License.
*/

import {CompositePropagator, W3CBaggagePropagator, W3CTraceContextPropagator} from '@opentelemetry/core';
import {NodeTracerProvider} from '@opentelemetry/sdk-trace-node';
import {BatchSpanProcessor} from '@opentelemetry/sdk-trace-base';
import {registerInstrumentations} from '@opentelemetry/instrumentation';
import {diag, DiagConsoleLogger, DiagLogLevel} from '@opentelemetry/api';
import {AwsInstrumentation} from '@opentelemetry/instrumentation-aws-sdk';
import {OTLPTraceExporter} from '@opentelemetry/exporter-trace-otlp-grpc';
import {B3Propagator, B3InjectEncoding} from '@opentelemetry/propagator-b3';
import {BatchSpanProcessor} from '@opentelemetry/sdk-trace-base';
import {CompositePropagator, W3CBaggagePropagator, W3CTraceContextPropagator} from '@opentelemetry/core';
import {ConnectInstrumentation} from '@opentelemetry/instrumentation-connect';
import {diag, DiagConsoleLogger, DiagLogLevel} from '@opentelemetry/api';
import {DnsInstrumentation} from '@opentelemetry/instrumentation-dns';
import {ExpressInstrumentation} from '@opentelemetry/instrumentation-express';
import {HttpInstrumentation} from '@opentelemetry/instrumentation-http';
import {NodeTracerProvider} from '@opentelemetry/sdk-trace-node';
import {OTLPTraceExporter} from '@opentelemetry/exporter-trace-otlp-grpc';
import {PinoInstrumentation} from '@opentelemetry/instrumentation-pino';
import {RedisInstrumentation} from '@opentelemetry/instrumentation-redis';
import {registerInstrumentations} from '@opentelemetry/instrumentation';
import {Resource} from '@opentelemetry/resources';
import {SemanticResourceAttributes} from '@opentelemetry/semantic-conventions';
import {ExpressInstrumentation} from '@opentelemetry/instrumentation-express';
import {PinoInstrumentation} from '@opentelemetry/instrumentation-pino';
import {DnsInstrumentation} from '@opentelemetry/instrumentation-dns';

diag.setLogger(new DiagConsoleLogger(), DiagLogLevel.INFO);

Expand Down Expand Up @@ -125,10 +127,12 @@ export function setupTracing(options = {}) {
requireParentforIncomingSpans: false,
ignoreIncomingRequestHook,
}),
new ConnectInstrumentation(),
new AwsInstrumentation({
sqsExtractContextPropagationFromPayload: true,
}),
new DnsInstrumentation(),
new RedisInstrumentation(),
],
});

Expand Down
Loading

0 comments on commit 4ddf268

Please sign in to comment.