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/javascript/common/tracing/span-metrics/index.mdx
-46Lines changed: 0 additions & 46 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -86,50 +86,4 @@ Sentry.init({
86
86
});
87
87
```
88
88
89
-
## Best Practices for Span Metrics
90
-
91
-
1.**Metric Naming**
92
-
93
-
- Use clear, consistent naming patterns
94
-
- Include the metric category (examples: `db`, `cache`, `http`)
95
-
- Use snake_case for metric names
96
-
97
-
2.**Data Types**
98
-
99
-
- Use appropriate numeric types for measurements
100
-
- Use booleans for status flags
101
-
- Use strings for categorical data
102
-
- Use arrays when grouping related values
103
-
104
-
3.**Performance Considerations**
105
-
106
-
- Consider the overhead of metric collection
107
-
- Use sampling when collecting high-frequency metrics
108
-
- Balance metric granularity with system performance
109
-
110
-
4.**Debugging and Monitoring**
111
-
- Include correlation IDs for related operations
112
-
- Add context that helps with troubleshooting
113
-
114
-
## Best Practices for Implementation
115
-
116
-
When implementing span metrics in your application:
117
-
118
-
1.**Start Small and Iterate**
119
-
120
-
- Begin with basic metrics that directly relate to your debugging or performance monitoring needs
121
-
- Add more detailed tracking as specific debugging needs emerge
122
-
- Remove metrics that aren't providing actionable insights
123
-
124
-
2.**Maintain Consistency**
125
-
126
-
- Use consistent naming patterns across your application
127
-
- Document metric meanings and units in your codebase
128
-
- Share common metrics across similar operations
129
-
130
-
3.**Focus on Actionability**
131
-
- Track metrics that help diagnose specific issues
132
-
- Consider what alerts or dashboard visualizations you'll want to create
133
-
- Ensure metrics can drive issue resolution or decision making
134
-
135
89
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