diff --git a/javascript/sentry-conventions/src/attributes.ts b/javascript/sentry-conventions/src/attributes.ts index 06b1edcfc..6a5bf0d0b 100644 --- a/javascript/sentry-conventions/src/attributes.ts +++ b/javascript/sentry-conventions/src/attributes.ts @@ -8595,6 +8595,30 @@ export const GRAPHQL_OPERATION_TYPE = 'graphql.operation.type'; */ export type GRAPHQL_OPERATION_TYPE_TYPE = string; +// Path: model/attributes/graphql/graphql__processing__type.json + +/** + * The type of processing represented by this span. `graphql.processing.type` + * + * Attribute Value Type: `string` {@link GRAPHQL_PROCESSING_TYPE_TYPE} + * + * Apply Scrubbing: manual + * + * Attribute defined in OTEL: No + * Visibility: public + * + * @example "parse" + * @example "validate" + * @example "execute" + * @example "resolve" + */ +export const GRAPHQL_PROCESSING_TYPE = 'graphql.processing.type'; + +/** + * Type for {@link GRAPHQL_PROCESSING_TYPE} graphql.processing.type + */ +export type GRAPHQL_PROCESSING_TYPE_TYPE = string; + // Path: model/attributes/grpc/grpc__error__bad_request__field_violations.json /** @@ -18064,6 +18088,7 @@ export const ATTRIBUTE_TYPE: Record = { 'graphql.document': 'string', 'graphql.operation.name': 'string', 'graphql.operation.type': 'string', + 'graphql.processing.type': 'string', 'grpc.error.bad_request.field_violations': 'string[]', 'grpc.error.debug_info.detail': 'string', 'grpc.error.debug_info.stack_entries': 'string[]', @@ -18858,6 +18883,7 @@ export type AttributeName = | typeof GRAPHQL_DOCUMENT | typeof GRAPHQL_OPERATION_NAME | typeof GRAPHQL_OPERATION_TYPE + | typeof GRAPHQL_PROCESSING_TYPE | typeof GRPC_ERROR_BAD_REQUEST_FIELD_VIOLATIONS | typeof GRPC_ERROR_DEBUG_INFO_DETAIL | typeof GRPC_ERROR_DEBUG_INFO_STACK_ENTRIES @@ -25223,6 +25249,23 @@ export const ATTRIBUTE_METADATA: Record = { example: 'query', changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }], }, + 'graphql.processing.type': { + brief: 'The type of processing represented by this span.', + type: 'string', + keys: ['graphql.processing.type'], + applyScrubbing: { + key: 'manual', + }, + isInOtel: false, + visibility: 'public', + example: 'parse', + examples: ['parse', 'validate', 'execute', 'resolve'], + changelog: [{ version: 'next', prs: [572], description: 'Added graphql.processing.type attribute' }], + additionalContext: [ + 'Well-known values are request, parse, validate, variable_coercion, plan, execute, subscription_event, step_execute, resolve, dataloader_dispatch, dataloader_batch and _OTHER. Use one of these if it applies, otherwise a custom value.', + 'Not to be confused with graphql.operation.type, which holds the GraphQL operation type (query, mutation, subscription) and only applies to spans that run an operation.', + ], + }, 'grpc.error.bad_request.field_violations': { brief: 'The individual field violations from a google.rpc.BadRequest error detail. Each entry is a JSON-encoded object with field, description, reason, and (optional) localized_message keys, mirroring google.rpc.BadRequest.FieldViolation.', @@ -33769,6 +33812,12 @@ export const ATTRIBUTE_SEARCH_METADATA: Record brief: 'The type of the operation being executed.', deprecationChain: ['graphql.operation.type'], }, + 'graphql.processing.type': { + canonicalName: 'graphql.processing.type', + type: 'string', + brief: 'The type of processing represented by this span.', + deprecationChain: ['graphql.processing.type'], + }, 'grpc.error.bad_request.field_violations': { canonicalName: 'grpc.error.bad_request.field_violations', type: 'string[]', @@ -36684,6 +36733,7 @@ export type Attributes = { [GRAPHQL_DOCUMENT]?: GRAPHQL_DOCUMENT_TYPE; [GRAPHQL_OPERATION_NAME]?: GRAPHQL_OPERATION_NAME_TYPE; [GRAPHQL_OPERATION_TYPE]?: GRAPHQL_OPERATION_TYPE_TYPE; + [GRAPHQL_PROCESSING_TYPE]?: GRAPHQL_PROCESSING_TYPE_TYPE; [GRPC_ERROR_BAD_REQUEST_FIELD_VIOLATIONS]?: GRPC_ERROR_BAD_REQUEST_FIELD_VIOLATIONS_TYPE; [GRPC_ERROR_DEBUG_INFO_DETAIL]?: GRPC_ERROR_DEBUG_INFO_DETAIL_TYPE; [GRPC_ERROR_DEBUG_INFO_STACK_ENTRIES]?: GRPC_ERROR_DEBUG_INFO_STACK_ENTRIES_TYPE; diff --git a/model/attributes/graphql/graphql__processing__type.json b/model/attributes/graphql/graphql__processing__type.json new file mode 100644 index 000000000..cd3c07873 --- /dev/null +++ b/model/attributes/graphql/graphql__processing__type.json @@ -0,0 +1,22 @@ +{ + "key": "graphql.processing.type", + "brief": "The type of processing represented by this span.", + "type": "string", + "apply_scrubbing": { + "key": "manual" + }, + "is_in_otel": false, + "visibility": "public", + "examples": ["parse", "validate", "execute", "resolve"], + "additional_context": [ + "Well-known values are request, parse, validate, variable_coercion, plan, execute, subscription_event, step_execute, resolve, dataloader_dispatch, dataloader_batch and _OTHER. Use one of these if it applies, otherwise a custom value.", + "Not to be confused with graphql.operation.type, which holds the GraphQL operation type (query, mutation, subscription) and only applies to spans that run an operation." + ], + "changelog": [ + { + "version": "next", + "prs": [572], + "description": "Added graphql.processing.type attribute" + } + ] +} diff --git a/model/name/graphql.json b/model/name/graphql.json index e14386943..5ea5ab253 100644 --- a/model/name/graphql.json +++ b/model/name/graphql.json @@ -20,8 +20,15 @@ "graphql.subscription", "graphql.validate" ], - "templates": ["GraphQL {{graphql.operation.type}}", "GraphQL Operation"], - "examples": ["GraphQL query", "GraphQL mutation", "GraphQL subscription", "GraphQL Operation"] + "templates": ["GraphQL {{graphql.operation.type}}", "GraphQL {{graphql.processing.type}}", "GraphQL Operation"], + "examples": [ + "GraphQL query", + "GraphQL mutation", + "GraphQL subscription", + "GraphQL parse", + "GraphQL resolve", + "GraphQL Operation" + ] } ] } diff --git a/python/src/sentry_conventions/attributes.py b/python/src/sentry_conventions/attributes.py index b06f5f484..e78a4b14d 100644 --- a/python/src/sentry_conventions/attributes.py +++ b/python/src/sentry_conventions/attributes.py @@ -5221,6 +5221,22 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): Example: "query" """ + # Path: model/attributes/graphql/graphql__processing__type.json + GRAPHQL_PROCESSING_TYPE: Literal["graphql.processing.type"] = ( + "graphql.processing.type" + ) + """The type of processing represented by this span. + + Type: str + Apply Scrubbing: manual + Defined in OTEL: No + Visibility: public + Example: "parse" + Example: "validate" + Example: "execute" + Example: "resolve" + """ + # Path: model/attributes/grpc/grpc__error__bad_request__field_violations.json GRPC_ERROR_BAD_REQUEST_FIELD_VIOLATIONS: Literal[ "grpc.error.bad_request.field_violations" @@ -17282,6 +17298,27 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): ChangelogEntry(version="0.0.0"), ], ), + "graphql.processing.type": AttributeMetadata( + brief="The type of processing represented by this span.", + type=AttributeType.STRING, + keys=("graphql.processing.type",), + apply_scrubbing=ApplyScrubbingInfo(key=ApplyScrubbing.MANUAL), + is_in_otel=False, + visibility=Visibility.PUBLIC, + example="parse", + examples=["parse", "validate", "execute", "resolve"], + changelog=[ + ChangelogEntry( + version="next", + prs=[572], + description="Added graphql.processing.type attribute", + ), + ], + additional_context=[ + "Well-known values are request, parse, validate, variable_coercion, plan, execute, subscription_event, step_execute, resolve, dataloader_dispatch, dataloader_batch and _OTHER. Use one of these if it applies, otherwise a custom value.", + "Not to be confused with graphql.operation.type, which holds the GraphQL operation type (query, mutation, subscription) and only applies to spans that run an operation.", + ], + ), "grpc.error.bad_request.field_violations": AttributeMetadata( brief="The individual field violations from a google.rpc.BadRequest error detail. Each entry is a JSON-encoded object with field, description, reason, and (optional) localized_message keys, mirroring google.rpc.BadRequest.FieldViolation.", type=AttributeType.STRING_ARRAY, @@ -24552,6 +24589,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): "graphql.document": str, "graphql.operation.name": str, "graphql.operation.type": str, + "graphql.processing.type": str, "grpc.error.bad_request.field_violations": List[str], "grpc.error.debug_info.detail": str, "grpc.error.debug_info.stack_entries": List[str],