Skip to content

Commit 75e0096

Browse files
committed
add url.full
1 parent 006b1d0 commit 75e0096

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

packages/google-cloud-serverless/src/integrations/google-cloud-http.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type * as common from '@google-cloud/common';
2-
import { HTTP_REQUEST_METHOD, SENTRY_OP, SERVER_ADDRESS } from '@sentry/conventions/attributes';
2+
import { HTTP_REQUEST_METHOD, SENTRY_OP, SERVER_ADDRESS, URL_FULL } from '@sentry/conventions/attributes';
33
import { WEB_SERVER_HTTP_CLIENT_SPAN_OP } from '@sentry/conventions/op';
44
import type { Client, IntegrationFn } from '@sentry/core';
55
import {
@@ -63,6 +63,7 @@ function wrapRequestFunction(orig: RequestFunction): RequestFunction {
6363
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.serverless',
6464
[HTTP_REQUEST_METHOD]: httpMethod,
6565
[SERVER_ADDRESS]: getServerAddress(this.apiEndpoint),
66+
[URL_FULL]: reqOpts.uri,
6667
},
6768
})
6869
: new SentryNonRecordingSpan();

packages/google-cloud-serverless/test/integrations/google-cloud-http.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { BigQuery } from '@google-cloud/bigquery';
2-
import { HTTP_REQUEST_METHOD, SENTRY_OP, SERVER_ADDRESS } from '@sentry/conventions/attributes';
2+
import { HTTP_REQUEST_METHOD, SENTRY_OP, SERVER_ADDRESS, URL_FULL } from '@sentry/conventions/attributes';
33
import { WEB_SERVER_HTTP_CLIENT_SPAN_OP } from '@sentry/conventions/op';
44
import { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '@sentry/core';
55
import { createTransport, NodeClient, setCurrentClient } from '@sentry/node';
@@ -85,6 +85,7 @@ describe('GoogleCloudHttp tracing', () => {
8585
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.serverless',
8686
[HTTP_REQUEST_METHOD]: 'POST',
8787
[SERVER_ADDRESS]: 'bigquery.googleapis.com',
88+
[URL_FULL]: '/jobs',
8889
},
8990
});
9091
expect(mockStartInactiveSpan).toBeCalledWith({
@@ -95,6 +96,7 @@ describe('GoogleCloudHttp tracing', () => {
9596
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.serverless',
9697
[HTTP_REQUEST_METHOD]: 'GET',
9798
[SERVER_ADDRESS]: 'bigquery.googleapis.com',
99+
[URL_FULL]: expect.stringMatching(/^\/queries\/.+/),
98100
},
99101
});
100102
});

0 commit comments

Comments
 (0)