Skip to content

Commit 237a65d

Browse files
committed
Adding few more guidelines
1 parent 4b697d1 commit 237a65d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/guidelines/business-metrics-guidelines.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
- [Core Principles](#core-principles)
66
- [Implementation Patterns](#implementation-patterns)
77
- [Performance Considerations](#performance-considerations)
8+
- [Versioning and Backward Compatibility](#versioning-and-backward-compatibility)
89
- [Testing Requirements](#testing-requirements)
910
- [Examples and References](#examples-and-references)
1011

@@ -95,6 +96,15 @@ private void recordFeatureBusinessMetric(ExecutionAttributes executionAttributes
9596
}
9697
```
9798

99+
In cases of high-level features (for example, Transfer Manager, Batch Manager, Cross-Region operations) that are resolved before ExecutionContext is built and we don't have access to ExecutionAttributes, prefer using `AwsExecutionContextBuilder.resolveUserAgentBusinessMetrics()` if the feature can be detected from client configuration or execution parameters (for example, retry mode from client config or RPC v2 CBOR protocol from execution parameters). If there is no option then request mutation is acceptable.
100+
101+
## Versioning and Backward Compatibility
102+
103+
### Business Metrics Changes Are Backward Compatible
104+
105+
In general, changes to existing business metrics can be treated as backward compatible since business metrics don't affect SDK functionality or customer code behavior, so customer applications remain unaffected. Business metrics are purely observational telemetry, so changes like modifying an existing business metric are safe changes. If we are making changes to existing business metrics, then discuss with the team and do a minor version bump if needed so that teams can identify the new metric from that version.
106+
107+
98108
## Testing Requirements
99109

100110
### Functional Testing with Mock HTTP Clients

0 commit comments

Comments
 (0)