You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NodeSJConfiguration interface does not have metricExporter and metricInterval properties causing TS errors using the README config. Im using latest nest-otel and latest versions of. all dependencies.
with the following config copied from the README (note I aded a jaeger trace exporter)
const otelSDK = new NodeSDK({
metricExporter: new PrometheusExporter(),
metricInterval: 1000,
traceExporter: new JaegerExporter(),
spanProcessor: new BatchSpanProcessor(new JaegerExporter()),
contextManager: new AsyncLocalStorageContextManager(),
textMapPropagator: new CompositePropagator({
propagators: [
new JaegerPropagator(),
new W3CTraceContextPropagator(),
new W3CBaggagePropagator(),
new B3Propagator(),
new B3Propagator({
injectEncoding: B3InjectEncoding.MULTI_HEADER,
}),
],
}),
instrumentations: [getNodeAutoInstrumentations()],
});
Neither metricExporter nor metricInterval are defined on the NodeSDKConfiguration interface passed to NodeSDK()
Aside from addressing the type incompatibility, how/where do i define my metric parameters if they don't exist on NodeSDKConfiguration? Is that possible with this configuration and package combination?
Thanks
The text was updated successfully, but these errors were encountered:
laurencefass
changed the title
NodeSJConfiguration interface does not have metricExporter and metricInterval properties
README configuration is in error because NodeSJConfiguration interface doesn't have metricExporter and metricInterval properties
Feb 15, 2023
laurencefass
changed the title
README configuration is in error because NodeSJConfiguration interface doesn't have metricExporter and metricInterval properties
README configuration Typescript errors: NodeSJConfiguration interface doesn't have metricExporter and metricInterval properties
Feb 15, 2023
laurencefass
changed the title
README configuration Typescript errors: NodeSJConfiguration interface doesn't have metricExporter and metricInterval properties
README configuration Typescript errors: NodeJSConfiguration interface doesn't have metricExporter and metricInterval properties
Feb 15, 2023
@laurencefass I ran into the same issue. After playing around with the example apps in the README, I noticed the versions for @opentelemetry/sdk-node were different. For example, the config you've shared works in this example because the node sdk version is "^0.24.0". However, in this other example your config would not work because the package version is "^0.34.0". I'm not sure what version changed the interface but I do know that metricExporter and metricInterval are no longer available options, as you pointed out.
The good news is that the metricReader field in the latest version will accept valid metric exporters (eg PrometheusExporter). I ended up using the setup from this example and things are working as expected.
NodeSJConfiguration interface does not have metricExporter and metricInterval properties causing TS errors using the README config. Im using latest nest-otel and latest versions of. all dependencies.
Im using the following combination of packages
with the following config copied from the README (note I aded a jaeger trace exporter)
Neither metricExporter nor metricInterval are defined on the NodeSDKConfiguration interface passed to NodeSDK()
Aside from addressing the type incompatibility, how/where do i define my metric parameters if they don't exist on NodeSDKConfiguration? Is that possible with this configuration and package combination?
Thanks
The text was updated successfully, but these errors were encountered: