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
{{ message }}
This repository was archived by the owner on Oct 3, 2023. It is now read-only.
* Controlling the global default `Sampler` via [TraceConfig](https://github.com/census-instrumentation/opencensus-specs/blob/master/trace/TraceConfig.md).
125
+
* Pass a specific `Sampler` as an option to the HTTP plugin. Plugins should support setting
126
+
a sampler per HTTP request.
127
+
128
+
Example cases where per-request sampling is useful:
129
+
130
+
- Having different sampling policy per route
131
+
- Having different sampling policy per method
132
+
- Filtering out certain paths (e.g. health endpoints) to disable tracing
133
+
- Always sampling critical paths
134
+
- Sampling based on the custom request header or query parameter
135
+
136
+
In the following Go example, incoming and outgoing request objects can
137
+
dynamically inspected to set a sampler.
138
+
139
+
For outgoing requests:
140
+
141
+
```go
142
+
typeTransportstruct {
143
+
// GetStartOptions allows to set start options per request.
0 commit comments