const AppLayer = Layer.mergeAll(
NodeFileSystem.layer,
Path.layer,
Logger.pretty,
NodeSdk.layer(() => ({
resource: {
serviceName: config.value.serviceName,
attributes: { "service.environment": config.value.serviceEnv },
},
spanProcessor: new BatchSpanProcessor(
new OTLPTraceExporter({ url: config.value.otlpEndpoint }),
),
metricReader: new PeriodicExportingMetricReader({
exporter: new OTLPMetricExporter({ url: config.value.otlpEndpoint }),
}),
})),
)
export const AppRuntime = ManagedRuntime.make(AppLayer)
const AppLayer = Layer.mergeAll(
NodeFileSystem.layer,
Path.layer,
Logger.pretty,
NodeSdk.layer(() => ({
resource: {
serviceName: config.value.serviceName,
attributes: { "service.environment": config.value.serviceEnv },
},
spanProcessor: new BatchSpanProcessor(
new OTLPTraceExporter({ url: config.value.otlpEndpoint }),
),
metricReader: new PeriodicExportingMetricReader({
exporter: new OTLPMetricExporter({ url: config.value.otlpEndpoint }),
}),
})),
)
export const AppRuntime = ManagedRuntime.make(AppLayer)