@livestore/utils 0.3.0-dev.12 → 0.3.0-dev.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/node/mod.ts CHANGED
@@ -14,7 +14,6 @@ import { makeNoopTracer } from '../NoopTracer.js'
14
14
  // import { tapCauseLogPretty } from '../effect/Effect.js'
15
15
 
16
16
  export * as Cli from '@effect/cli'
17
- export * as PlatformBun from '@effect/platform-bun'
18
17
  export * as PlatformNode from '@effect/platform-node'
19
18
  export * as SocketServer from '@effect/experimental/SocketServer'
20
19
  export * as OtelResource from '@effect/opentelemetry/Resource'
@@ -52,8 +51,7 @@ export const OtelLiveHttp = ({
52
51
  > =>
53
52
  Effect.gen(function* () {
54
53
  const config = yield* Config.all({
55
- exporterUrlTracing: Config.string('OTEL_EXPORTER_OTLP_TRACES_ENDPOINT'),
56
- exporterUrlMracing: Config.string('OTEL_EXPORTER_OTLP_METRICS_ENDPOINT'),
54
+ exporterUrl: Config.string('OTEL_EXPORTER_OTLP_ENDPOINT'),
57
55
  serviceName: serviceName
58
56
  ? Config.succeed(serviceName)
59
57
  : Config.string('OTEL_SERVICE_NAME').pipe(Config.withDefault('overtone-node-utils-default-service')),
@@ -65,7 +63,7 @@ export const OtelLiveHttp = ({
65
63
  const resource = { serviceName: config.serviceName }
66
64
 
67
65
  // METRICS
68
- const metricExporter = new OTLPMetricExporter({ url: config.exporterUrlMracing })
66
+ const metricExporter = new OTLPMetricExporter({ url: `${config.exporterUrl}/v1/metrics` })
69
67
 
70
68
  const metricReader = new PeriodicExportingMetricReader({
71
69
  exporter: metricExporter,
@@ -76,7 +74,9 @@ export const OtelLiveHttp = ({
76
74
  const OtelLive = OtelNodeSdk.layer(() => ({
77
75
  resource,
78
76
  metricReader,
79
- spanProcessor: new BatchSpanProcessor(new OTLPTraceExporter({ url: config.exporterUrlTracing, headers: {} })),
77
+ spanProcessor: new BatchSpanProcessor(
78
+ new OTLPTraceExporter({ url: `${config.exporterUrl}/v1/traces`, headers: {} }),
79
+ ),
80
80
  }))
81
81
 
82
82
  const RootSpanLive = Layer.span(config.rootSpanName, {
@@ -104,7 +104,7 @@ export const logTraceUiUrlForSpan = (printMsg?: (url: string) => string) => (spa
104
104
 
105
105
  export const getTracingBackendUrl = (span: otel.Span) =>
106
106
  Effect.gen(function* () {
107
- const endpoint = yield* Config.string('TRACING_UI_ENDPOINT').pipe(Config.option, Effect.orDie)
107
+ const endpoint = yield* Config.string('GRAFANA_ENDPOINT').pipe(Config.option, Effect.orDie)
108
108
  if (endpoint._tag === 'None') return
109
109
 
110
110
  const traceId = span.spanContext().traceId
package/tsconfig.json CHANGED
@@ -6,5 +6,5 @@
6
6
  "tsBuildInfoFile": "./dist/.tsbuildinfo.json"
7
7
  },
8
8
  "include": ["./src"],
9
- "references": [{ "path": "../db-schema"}]
9
+ "references": []
10
10
  }