You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/platforms/python/tracing/span-metrics/index.mdx
-41Lines changed: 0 additions & 41 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -99,45 +99,4 @@ sentry_sdk.init(
99
99
)
100
100
```
101
101
102
-
## Best Practices for Span Metrics
103
-
104
-
1.**Metric Naming**
105
-
- Use clear, consistent naming patterns
106
-
- Include the metric category (examples: `db`, `cache`, `http`)
107
-
- Use snake_case for metric names
108
-
109
-
2.**Data Types**
110
-
- Use appropriate numeric types for measurements
111
-
- Use booleans for status flags
112
-
- Use strings for categorical data
113
-
- Use arrays when grouping related values
114
-
115
-
3.**Performance Considerations**
116
-
- Consider the overhead of metric collection
117
-
- Use sampling when collecting high-frequency metrics
118
-
- Balance metric granularity with system performance
119
-
120
-
4.**Debugging and Monitoring**
121
-
- Include correlation IDs for related operations
122
-
- Add context that helps with troubleshooting
123
-
124
-
## Best Practices for Implementation
125
-
126
-
When implementing span metrics in your application:
127
-
128
-
1.**Start Small and Iterate**
129
-
- Begin with basic metrics that directly relate to your debugging or performance monitoring needs
130
-
- Add more detailed tracking as specific debugging needs emerge
131
-
- Remove metrics that aren't providing actionable insights
132
-
133
-
2.**Maintain Consistency**
134
-
- Use consistent naming patterns across your application
135
-
- Document metric meanings and units in your codebase
136
-
- Share common metrics across similar operations
137
-
138
-
3.**Focus on Actionability**
139
-
- Track metrics that help diagnose specific issues
140
-
- Consider what alerts or dashboard visualizations you'll want to create
141
-
- Ensure metrics can drive issue resolution or decision making
142
-
143
102
For detailed examples of how to implement span metrics in common scenarios, see our <PlatformLinkto="/tracing/span-metrics/examples/">Span Metrics Examples</PlatformLink> guide.
0 commit comments