Commit 5a40696
feat(telemetry): add OpenTelemetry tracing for pipeline execution (#8055)
* feat(telemetry): add OpenTelemetry tracing for pipeline execution
* refactor: add context.Context to Resource interface
* refactor: propagate context.Context into HTTP calls and SCM clients
* fix(telemetry): harden OTel tracing against credential leaks and fix span correctness
Sanitize error strings recorded on spans to strip URL-embedded credentials.
Replace autoexport with explicit OTLP/stdout exporters to reduce binary bloat.
Store trace.Tracer on structs instead of calling the global registry per-invocation.
Remove OTel types from domain APIs (CrawlerResult, Pipeline).
- Add telemetry.SanitizeError and telemetry.RecordSpanError helpers
- Replace autoexport with otlptracegrpc/otlptracehttp/stdouttrace
- Add tracer field to Engine, Pipeline, AutoDiscovery structs
- Replace CrawlerSpanCtx (trace.SpanContext) with CrawlerKind (string)
- Fix missing span.SetStatus on target FAILURE path
- Fix lone RecordError without SetStatus in pipeline loop (use AddEvent)
- Move span start before mutex in runFlowCallbackWithCtx for accurate timing
- Rename unused ctx to _ in 98 resource plugin files
- Restore invariant comments on unreachable DAG error paths
Signed-off-by: Loïs Postula <lois@postu.la>
---------
Signed-off-by: Loïs Postula <lois@postu.la>
Co-authored-by: Olivier Vernin <olivier@vernin.me>1 parent 2a69a93 commit 5a40696
File tree
282 files changed
+1993
-880
lines changed- .github
- ISSUE_TEMPLATE
- workflows
- cmd
- pkg
- core
- engine
- httpclient
- pipeline
- action
- autodiscovery
- condition
- resource
- scm
- source
- target
- telemetry
- plugins
- resources
- awsami
- bazelmod
- bazelregistry
- bitbucket/pullrequest
- cargopackage
- csv
- dockerdigest
- dockerfile
- dockerimage
- file
- gitbranch
- gitea
- branch
- pullrequest
- release
- tag
- githubrelease
- gitlab
- branch
- mergerequest
- release
- tag
- gittag
- go
- gomod
- language
- module
- hcl
- helm
- jenkins
- json
- maven
- npm
- shell
- stash
- branch
- pullrequest
- release
- tag
- temurin
- terraform
- lock
- provider
- registry
- toml
- toolversions
- updateclihttp
- xml
- yaml
- scms
- bitbucket
- gitea
- github
- gitlab
- git
- stash
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
282 files changed
+1993
-880
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
61 | 103 | | |
62 | 104 | | |
63 | 105 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| 108 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
| 10 | + | |
| 11 | + | |
8 | 12 | | |
9 | 13 | | |
10 | 14 | | |
11 | 15 | | |
12 | 16 | | |
| 17 | + | |
13 | 18 | | |
14 | 19 | | |
| 20 | + | |
15 | 21 | | |
16 | 22 | | |
17 | 23 | | |
| |||
104 | 110 | | |
105 | 111 | | |
106 | 112 | | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
107 | 132 | | |
108 | 133 | | |
109 | 134 | | |
110 | 135 | | |
111 | 136 | | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
| 137 | + | |
| 138 | + | |
136 | 139 | | |
137 | 140 | | |
138 | 141 | | |
| |||
147 | 150 | | |
148 | 151 | | |
149 | 152 | | |
150 | | - | |
| 153 | + | |
151 | 154 | | |
152 | 155 | | |
153 | 156 | | |
154 | 157 | | |
155 | 158 | | |
156 | | - | |
| 159 | + | |
157 | 160 | | |
158 | 161 | | |
159 | 162 | | |
| |||
168 | 171 | | |
169 | 172 | | |
170 | 173 | | |
171 | | - | |
| 174 | + | |
172 | 175 | | |
173 | 176 | | |
174 | 177 | | |
175 | 178 | | |
176 | 179 | | |
177 | | - | |
| 180 | + | |
178 | 181 | | |
179 | 182 | | |
180 | 183 | | |
| |||
189 | 192 | | |
190 | 193 | | |
191 | 194 | | |
192 | | - | |
| 195 | + | |
193 | 196 | | |
194 | 197 | | |
195 | 198 | | |
| |||
242 | 245 | | |
243 | 246 | | |
244 | 247 | | |
245 | | - | |
| 248 | + | |
246 | 249 | | |
247 | 250 | | |
248 | 251 | | |
| |||
290 | 293 | | |
291 | 294 | | |
292 | 295 | | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
293 | 322 | | |
294 | 323 | | |
295 | 324 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
73 | 80 | | |
74 | 81 | | |
75 | 82 | | |
| |||
128 | 135 | | |
129 | 136 | | |
130 | 137 | | |
| 138 | + | |
131 | 139 | | |
132 | 140 | | |
133 | 141 | | |
| |||
159 | 167 | | |
160 | 168 | | |
161 | 169 | | |
| 170 | + | |
162 | 171 | | |
163 | 172 | | |
164 | 173 | | |
| |||
196 | 205 | | |
197 | 206 | | |
198 | 207 | | |
| 208 | + | |
199 | 209 | | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
207 | 215 | | |
208 | 216 | | |
209 | 217 | | |
210 | | - | |
211 | | - | |
| 218 | + | |
| 219 | + | |
212 | 220 | | |
213 | 221 | | |
214 | 222 | | |
| |||
0 commit comments