Skip to content

Commit

Permalink
improve repo span
Browse files Browse the repository at this point in the history
  • Loading branch information
patroza committed Nov 14, 2023
1 parent 49ae4a9 commit ed0ecae
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/new-ties-thank.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@effect-app/infra": patch
---

improve trace
7 changes: 4 additions & 3 deletions packages/infra/_src/services/RepositoryBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ export function makeRepo<
}
return r
})
.withSpan("@effect-app/infra/Repository.make: " + name)
.withSpan("@effect-app/infra/Repository.make", { attributes: { modelName: name } })
.withLogSpan("Repository.make: " + name)
}

Expand Down Expand Up @@ -297,8 +297,9 @@ export function makeStore<
make<PM, string, R, E>(
pluralize(name),
makeInitial
? makeInitial
.map((_) => _.map(encodeToPM()))
? (makeInitial
.map((_) => _.map(encodeToPM())))
.withSpan("@effect-app/infra/Repository.makeInitial")
: undefined,
{
...config,
Expand Down

0 comments on commit ed0ecae

Please sign in to comment.