Skip to content

Commit c0a6241

Browse files
authored
Tracing with opentelemetry (#895)
* tracing * fix lint * add jaeger exporter * use grpc exporter * fix url * change localhost to 127.0.0.1 * remove http from exporter url * use otlp http * add /v1/traces to url * add isServer condition * refactor instrumentation and add sampler config * fix otel propagators * revert package.json and lock * refactor OTEL code * remove w3c propagator * lint fix * use grpc exporter * Add grpc config to register otel
1 parent b856bc0 commit c0a6241

File tree

6 files changed

+693
-27
lines changed

6 files changed

+693
-27
lines changed

next.config.mjs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,14 @@ const BUILD_OUTPUT =
1313
: undefined;
1414

1515
const nextConfig = {
16-
webpack: (config) => {
16+
webpack: (config, options) => {
1717
config.resolve.alias = {
1818
...config.resolve.alias,
1919
'@': path.resolve(__dirname, './src'),
2020
};
21+
if (options.isServer) {
22+
config.externals.push('@grpc/grpc-js', 'require-in-the-middle', '@opentelemetry/exporter-jaeger');
23+
}
2124
return config;
2225
},
2326
redirects: async () => {

0 commit comments

Comments
 (0)