create_instrumentation_configuration
¶
create_instrumentation_configuration(
instrumentation_type: InstrumentationType,
service: str,
environment: str,
signal_type: DynamicInstrumentationSignalType,
location: Location,
capture_configuration: CaptureConfiguration,
*,
config_overrides: Optional[ApplicationSignalsClientConfig] = None,
description: Optional[str] = None,
expires_at: Optional[datetime] = None,
attribute_filters: Optional[DynamicInstrumentationAttributeFilters] = None,
tags: Optional[TagList] = None,
) -> CreateInstrumentationConfigurationResponse
Creates a dynamic instrumentation configuration for a specific code or endpoint location within a service and environment. Configurations are immutable after creation.
For BREAKPOINT type configurations, they expire after 24 hours unless a shorter expiration is provided. For PROBE type configurations, they persist until explicitly deleted; an expiration cannot be set for PROBE configurations.
If a configuration already exists for the same service, environment, signal type, and location, this operation returns a conflict instead of overwriting it. Use attribute filters and capture settings to control where the instrumentation runs and which data is collected.
Parameters:
-
instrumentation_type(InstrumentationType) –Type of instrumentation: BREAKPOINT (temporary) or PROBE (permanent)
-
service(str) –The name of the service to instrument. This should match the
service.nameresource attribute reported by the application. -
environment(str) –The environment that the service is running in, such as
eks:cluster-prod/namespaceorec2:production. -
signal_type(DynamicInstrumentationSignalType) –The telemetry signal type to emit for this instrumentation. The supported value is
SNAPSHOT. -
location(Location) –The location where instrumentation should be applied. Specify a
CodeLocationfor code-level instrumentation. -
description(Optional[str], default:None) –An optional short description (up to 50 characters) that explains the purpose of this instrumentation.
-
expires_at(Optional[datetime], default:None) –For BREAKPOINT: optional, defaults to 24 hours, must be between 5 min and 24 hours. For PROBE: not supported. PROBE configurations are permanent and persist until explicitly deleted.
-
attribute_filters(Optional[DynamicInstrumentationAttributeFilters], default:None) –Client-side filters that target specific instances. Each object in the array is AND-matched on its keys, and multiple objects are OR-matched to decide where to apply the instrumentation.
-
capture_configuration(CaptureConfiguration) –Specifies what to capture when the instrumentation point is hit. Specify
CodeCapturefor code-level capture settings. -
tags(Optional[TagList], default:None) –An optional list of key-value pairs to associate with the instrumentation configuration. Tags can help you organize and categorize your resources.
Raises:
-
ConflictException–This operation attempted to create a resource that already exists.
-
ServiceQuotaExceededException–This request exceeds a service quota.
-
ThrottlingException–The request was throttled because of quota limits.
-
ValidationException–The resource is not valid.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_application_signals/_services/application_signals.py
412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 | |