aws_xray_sdk package¶
Subpackages¶
- aws_xray_sdk.core package
- Subpackages
- aws_xray_sdk.core.emitters package
- aws_xray_sdk.core.exceptions package
- aws_xray_sdk.core.models package
- Submodules
- aws_xray_sdk.core.models.default_dynamic_naming module
- aws_xray_sdk.core.models.dummy_entities module
- aws_xray_sdk.core.models.entity module
- aws_xray_sdk.core.models.facade_segment module
- aws_xray_sdk.core.models.http module
- aws_xray_sdk.core.models.noop_traceid module
- aws_xray_sdk.core.models.segment module
- aws_xray_sdk.core.models.subsegment module
- aws_xray_sdk.core.models.throwable module
- aws_xray_sdk.core.models.trace_header module
- aws_xray_sdk.core.models.traceid module
- Module contents
- aws_xray_sdk.core.plugins package
- aws_xray_sdk.core.sampling package
- Subpackages
- Submodules
- aws_xray_sdk.core.sampling.connector module
- aws_xray_sdk.core.sampling.reservoir module
- aws_xray_sdk.core.sampling.rule_cache module
- aws_xray_sdk.core.sampling.rule_poller module
- aws_xray_sdk.core.sampling.sampler module
- aws_xray_sdk.core.sampling.sampling_rule module
- aws_xray_sdk.core.sampling.target_poller module
- Module contents
- aws_xray_sdk.core.streaming package
- aws_xray_sdk.core.utils package
- Submodules
- aws_xray_sdk.core.async_context module
- aws_xray_sdk.core.async_recorder module
- aws_xray_sdk.core.context module
- aws_xray_sdk.core.daemon_config module
- aws_xray_sdk.core.lambda_launcher module
- aws_xray_sdk.core.patcher module
- aws_xray_sdk.core.recorder module
AWSXRayRecorder
AWSXRayRecorder.begin_segment()
AWSXRayRecorder.begin_subsegment()
AWSXRayRecorder.begin_subsegment_without_sampling()
AWSXRayRecorder.capture()
AWSXRayRecorder.clear_trace_entities()
AWSXRayRecorder.configure()
AWSXRayRecorder.context
AWSXRayRecorder.current_segment()
AWSXRayRecorder.current_subsegment()
AWSXRayRecorder.dynamic_naming
AWSXRayRecorder.emitter
AWSXRayRecorder.enabled
AWSXRayRecorder.end_segment()
AWSXRayRecorder.end_subsegment()
AWSXRayRecorder.get_trace_entity()
AWSXRayRecorder.in_segment()
AWSXRayRecorder.in_subsegment()
AWSXRayRecorder.is_sampled()
AWSXRayRecorder.max_trace_back
AWSXRayRecorder.put_annotation()
AWSXRayRecorder.put_metadata()
AWSXRayRecorder.record_subsegment()
AWSXRayRecorder.sampler
AWSXRayRecorder.sampling
AWSXRayRecorder.service
AWSXRayRecorder.set_trace_entity()
AWSXRayRecorder.stream_sql
AWSXRayRecorder.stream_subsegments()
AWSXRayRecorder.streaming
AWSXRayRecorder.streaming_threshold
- Module contents
AWSXRayRecorder
AWSXRayRecorder.begin_segment()
AWSXRayRecorder.begin_subsegment()
AWSXRayRecorder.begin_subsegment_without_sampling()
AWSXRayRecorder.capture()
AWSXRayRecorder.clear_trace_entities()
AWSXRayRecorder.configure()
AWSXRayRecorder.context
AWSXRayRecorder.current_segment()
AWSXRayRecorder.current_subsegment()
AWSXRayRecorder.dynamic_naming
AWSXRayRecorder.emitter
AWSXRayRecorder.enabled
AWSXRayRecorder.end_segment()
AWSXRayRecorder.end_subsegment()
AWSXRayRecorder.get_trace_entity()
AWSXRayRecorder.in_segment()
AWSXRayRecorder.in_subsegment()
AWSXRayRecorder.is_sampled()
AWSXRayRecorder.max_trace_back
AWSXRayRecorder.put_annotation()
AWSXRayRecorder.put_metadata()
AWSXRayRecorder.record_subsegment()
AWSXRayRecorder.sampler
AWSXRayRecorder.sampling
AWSXRayRecorder.service
AWSXRayRecorder.set_trace_entity()
AWSXRayRecorder.stream_sql
AWSXRayRecorder.stream_subsegments()
AWSXRayRecorder.streaming
AWSXRayRecorder.streaming_threshold
patch()
patch_all()
- Subpackages
- aws_xray_sdk.ext package
- Subpackages
- aws_xray_sdk.ext.aiobotocore package
- aws_xray_sdk.ext.aiohttp package
- aws_xray_sdk.ext.botocore package
- aws_xray_sdk.ext.bottle package
- aws_xray_sdk.ext.django package
- aws_xray_sdk.ext.flask package
- aws_xray_sdk.ext.flask_sqlalchemy package
- aws_xray_sdk.ext.httplib package
- aws_xray_sdk.ext.httpx package
- aws_xray_sdk.ext.mysql package
- aws_xray_sdk.ext.pg8000 package
- aws_xray_sdk.ext.psycopg2 package
- aws_xray_sdk.ext.pymongo package
- aws_xray_sdk.ext.pymysql package
- aws_xray_sdk.ext.pynamodb package
- aws_xray_sdk.ext.requests package
- aws_xray_sdk.ext.sqlalchemy package
- aws_xray_sdk.ext.sqlalchemy_core package
- aws_xray_sdk.ext.sqlite3 package
- Submodules
- aws_xray_sdk.ext.boto_utils module
- aws_xray_sdk.ext.dbapi2 module
- aws_xray_sdk.ext.util module
- Module contents
- Subpackages
Submodules¶
aws_xray_sdk.sdk_config module¶
- class aws_xray_sdk.sdk_config.SDKConfig¶
Bases:
object
Global Configuration Class that defines SDK-level configuration properties.
- Enabling/Disabling the SDK:
- By default, the SDK is enabled unless if an environment variable AWS_XRAY_SDK_ENABLED
is set. If it is set, it needs to be a valid string boolean, otherwise, it will default to true. If the environment variable is set, all calls to set_sdk_enabled() will prioritize the value of the environment variable.
Disabling the SDK affects the recorder, patcher, and middlewares in the following ways: For the recorder, disabling automatically generates DummySegments for subsequent segments
and DummySubsegments for subsegments created and thus not send any traces to the daemon.
- For the patcher, module patching will automatically be disabled. The SDK must be disabled
before calling patcher.patch() method in order for this to function properly.
- For the middleware, no modification is made on them, but since the recorder automatically
generates DummySegments for all subsequent calls, they will not generate segments/subsegments to be sent.
- Environment variables:
- “AWS_XRAY_SDK_ENABLED” - If set to ‘false’ disables the SDK and causes the explained above
to occur.
- DISABLED_ENTITY_NAME = 'dummy'¶
- XRAY_ENABLED_KEY = 'AWS_XRAY_SDK_ENABLED'¶
- classmethod sdk_enabled()¶
Returns whether the SDK is enabled or not.
- classmethod set_sdk_enabled(value)¶
Modifies the enabled flag if the “AWS_XRAY_SDK_ENABLED” environment variable is not set, otherwise, set the enabled flag to be equal to the environment variable. If the env variable is an invalid string boolean, it will default to true.
- Parameters:
value (bool) – Flag to set whether the SDK is enabled or disabled.
Environment variables AWS_XRAY_SDK_ENABLED overrides argument value.