Skip to content

Commit f71275c

Browse files
committed
PR feedback
1 parent 0c6e897 commit f71275c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/opentelemetry/src/utils/parseSpanDescription.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,15 +137,15 @@ export function descriptionForHttpMethod(
137137
return { op: opParts.join('.'), description: name, source: 'custom' };
138138
}
139139

140-
const graphqlOperations = attributes[SEMANTIC_ATTRIBUTE_SENTRY_GRAPHQL_OPERATION];
140+
const graphqlOperationsAttribute = attributes[SEMANTIC_ATTRIBUTE_SENTRY_GRAPHQL_OPERATION];
141141

142142
// Ex. GET /api/users
143143
const baseDescription = `${httpMethod} ${urlPath}`;
144144

145145
// When the http span has a graphql operation, append it to the description
146146
// We add these in the graphqlIntegration
147-
const description = graphqlOperations
148-
? `${baseDescription} (${getGraphqlOperationNames(graphqlOperations)})`
147+
const description = graphqlOperationsAttribute
148+
? `${baseDescription} (${getGraphqlOperationNamesFromAttribute(graphqlOperationsAttribute)})`
149149
: baseDescription;
150150

151151
// If `httpPath` is a root path, then we can categorize the transaction source as route.
@@ -171,7 +171,7 @@ export function descriptionForHttpMethod(
171171
};
172172
}
173173

174-
function getGraphqlOperationNames(attr: AttributeValue): string {
174+
function getGraphqlOperationNamesFromAttribute(attr: AttributeValue): string {
175175
if (Array.isArray(attr)) {
176176
const sorted = attr.slice().sort();
177177

0 commit comments

Comments
 (0)