Skip to content

Commit

Permalink
Fix routing issues. Fixes #162
Browse files Browse the repository at this point in the history
  • Loading branch information
evanderkoogh committed Sep 9, 2024
1 parent b38873a commit d0dcc83
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .changeset/gold-beers-travel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@microlabs/otel-cf-workers': patch
---

Fix importing issues. Fixes #162
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,4 @@ dist
examples/worker/.dev.vars
*/.dev.vars
examples/queue/.dev.vars
versions.json
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
}
},
"scripts": {
"clean": "rimraf ./dist",
"clean": "rimraf ./dist versions.json",
"format": "prettier --ignore-unknown --write .",
"build-esm": "tsc",
"build-cjs": "tsc -p tsconfig-cjs.json",
"fix-dist": "echo '{\"type\": \"module\"}' > dist/esm/package.json && echo '{\"type\": \"commonjs\"}' > dist/cjs/package.json",
"build": "run-s -l clean build-esm build-cjs fix-dist",
"release": "changeset version && pnpm run build && changeset publish",
"preversion": "run-s -l check:* build",
"prepublishOnly": "run-s -l check:* build",
"build": "run-s -l build-esm build-cjs fix-dist",
"cs-version": "changeset version && pnpm version --json > versions.json",
"cs-publish": "changeset publish",
"release": "run-s -l clean cs-version build cs-publish",
"check": "run-s -l check:*",
"check:format": "prettier . --check --ignore-unknown",
"check:type-esm": "tsc --noEmit",
Expand Down
7 changes: 4 additions & 3 deletions src/sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import { instrumentGlobalCache } from './instrumentation/cache.js'
import { createQueueHandler } from './instrumentation/queue.js'
import { DOClass, instrumentDOClass } from './instrumentation/do.js'
import { createScheduledHandler } from './instrumentation/scheduled.js'
import { name, version } from '../package.json'
import * as versions from '../versions.json'

type FetchHandler = ExportedHandlerFetchHandler<unknown, unknown>
type ScheduledHandler = ExportedHandlerScheduledHandler<unknown>
Expand Down Expand Up @@ -57,8 +57,9 @@ const createResource = (config: ResolvedTraceConfig): Resource => {
'cloud.region': 'earth',
'faas.max_memory': 134217728,
'telemetry.sdk.language': 'js',
'telemetry.sdk.name': name,
'telemetry.sdk.version': version,
'telemetry.sdk.name': '@microlabs/otel-cf-workers',
'telemetry.sdk.version': versions['@microlabs/otel-cf-workers'],
'telemetry.sdk.build.node_version': versions['node'],
}
const serviceResource = new Resource({
'service.name': config.service.name,
Expand Down

0 comments on commit d0dcc83

Please sign in to comment.