Skip to content

Commit

Permalink
fix(remix): align span operations to new operations (#5889)
Browse files Browse the repository at this point in the history
Signed-off-by: Outsider <outsideris@gmail.com>
  • Loading branch information
outsideris authored Oct 6, 2022
1 parent 912f5f1 commit 6bd07a6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions packages/remix/src/utils/instrumentServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ function makeWrappedDocumentRequestFunction(

try {
const span = activeTransaction?.startChild({
op: 'remix.server.documentRequest',
op: 'function.remix.document_request',
description: activeTransaction.name,
tags: {
method: request.method,
Expand Down Expand Up @@ -147,7 +147,7 @@ function makeWrappedDataFunction(origFn: DataFunction, id: string, name: 'action

try {
const span = activeTransaction?.startChild({
op: `remix.server.${name}`,
op: `function.remix.${name}`,
description: id,
tags: {
name,
Expand Down
8 changes: 4 additions & 4 deletions packages/remix/test/integration/test/server/action.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@ describe.each(['builtin', 'express'])('Remix API Actions with adapter = %s', ada
spans: [
{
description: 'routes/action-json-response/$id',
op: 'remix.server.action',
op: 'function.remix.action',
},
{
description: 'root',
op: 'remix.server.loader',
op: 'function.remix.loader',
},
{
description: 'routes/action-json-response/$id',
op: 'remix.server.loader',
op: 'function.remix.loader',
},
{
description: 'routes/action-json-response/$id',
op: 'remix.server.documentRequest',
op: 'function.remix.document_request',
},
],
});
Expand Down
6 changes: 3 additions & 3 deletions packages/remix/test/integration/test/server/loader.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@ describe.each(['builtin', 'express'])('Remix API Loaders with adapter = %s', ada
spans: [
{
description: 'root',
op: 'remix.server.loader',
op: 'function.remix.loader',
},
{
description: 'routes/loader-json-response/$id',
op: 'remix.server.loader',
op: 'function.remix.loader',
},
{
description: 'routes/loader-json-response/$id',
op: 'remix.server.documentRequest',
op: 'function.remix.document_request',
},
],
});
Expand Down

0 comments on commit 6bd07a6

Please sign in to comment.