Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions sentry_sdk/consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,12 @@
Example: "10.1.2.80"
"""

CLOUD_REGION = "cloud.region"
"""
The geographical region the resource is running.
Example: "us-east-1"
"""

CODE_FILEPATH = "code.filepath"
"""
.. deprecated::
Expand Down Expand Up @@ -977,12 +983,24 @@
Example: "com.example.ExampleService/exampleMethod"
"""

RPC_SERVICE = "rpc.service"
"""
The full (logical) name of the service being called, including its package name, if applicable.
Example: "myService.BestService"
"""

RPC_RESPONSE_STATUS_CODE = "rpc.response.status_code"
"""
Status code of the RPC returned by the RPC server or generated by the client.
Example: "DEADLINE_EXCEEDED"
"""

RPC_SYSTEM_NAME = "rpc.system.name"
"""
A string identifying the remoting system.
Example: "aws-api"
"""

Check warning on line 1003 in sentry_sdk/consts.py

View check run for this annotation

@sentry/warden / warden: find-bugs

RPC_SYSTEM_NAME uses non-standard attribute key rpc.system.name

Use `rpc.system` (OTEL AWS SDK / RPC semconv), not `rpc.system.name`; otherwise AWS spans emit a non-standard attribute backends won't recognize.
Comment on lines +998 to +1003

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RPC_SYSTEM_NAME uses non-standard attribute key rpc.system.name

Use rpc.system (OTEL AWS SDK / RPC semconv), not rpc.system.name; otherwise AWS spans emit a non-standard attribute backends won't recognize.

Evidence
  • Hunk defines RPC_SYSTEM_NAME = "rpc.system.name".
  • _get_client_attributes() in sentry_sdk/integrations/boto3/_instrumentation.py sets SPANDATA.RPC_SYSTEM_NAME to "aws-api" on every client span.
  • OTEL AWS SDK spans require rpc.system=aws-api (same docs linked in that helper); RPC conventions use rpc.system, unlike DB's db.system.name.
  • Tests assert the constant value only, so the wrong key is not caught.

Identified by Warden · find-bugs · VD7-M84

SERVER_ADDRESS = "server.address"
"""
Name of the database host.
Expand Down Expand Up @@ -1164,6 +1182,18 @@
Example: "prod"
"""

SENTRY_OP = "sentry.op"
"""
The operation of a span.
Example: "http.client"
"""

SENTRY_ORIGIN = "sentry.origin"
"""
The origin of the instrumentation (e.g. span, log, etc.)
Example: "auto.http.otel.fastify"
"""

SENTRY_RELEASE = "sentry.release"
"""
The Sentry release.
Expand Down
269 changes: 0 additions & 269 deletions sentry_sdk/integrations/boto3.py

This file was deleted.

22 changes: 22 additions & 0 deletions sentry_sdk/integrations/boto3/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
from sentry_sdk.integrations import DidNotEnable, Integration, _check_minimum_version
from sentry_sdk.utils import parse_version

try:
from botocore import __version__ as BOTOCORE_VERSION
except ImportError:
raise DidNotEnable("botocore is not installed")


class Boto3Integration(Integration):
identifier = "boto3"
origin = f"auto.http.{identifier}"

@staticmethod
def setup_once() -> None:
version = parse_version(BOTOCORE_VERSION)
_check_minimum_version(Boto3Integration, version, "botocore")

# local import to avoid import cycle
from sentry_sdk.integrations.boto3._client import _patch_botocore_client

_patch_botocore_client()
Loading
Loading