Skip to content

Commit

Permalink
Fix telemetry sdk attributes (#105)
Browse files Browse the repository at this point in the history
* Fix telemetry sdk attributes

* Add changeset
  • Loading branch information
DaniFoldi authored Apr 2, 2024
1 parent 97aa141 commit d107ae8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/cuddly-cars-give.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@microlabs/otel-cf-workers": patch
---

Fix telemetry sdk attributes
4 changes: 3 additions & 1 deletion src/sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +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'

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

0 comments on commit d107ae8

Please sign in to comment.