Commit e02823b
authored
elastic-opentelemetry-instrumentation-openai: Add support for tracing embeddings calls (#20)
{
"name": "embeddings all-minilm:33m",
"context": {
"trace_id": "0x34b6f145212c169ea39a980ff670dee3",
"span_id": "0x74b9bd94f2ea6f31",
"trace_state": "[]"
},
"kind": "SpanKind.CLIENT",
"parent_id": null,
"start_time": "2024-09-27T14:55:13.104397Z",
"end_time": "2024-09-27T14:55:13.261547Z",
"status": {
"status_code": "UNSET"
},
"attributes": {
"gen_ai.operation.name": "embeddings",
"gen_ai.request.model": "all-minilm:33m",
"gen_ai.system": "openai",
"server.address": "localhost",
"server.port": 11434,
"gen_ai.request.encoding_format": "float",
"gen_ai.response.model": "all-minilm:33m",
"gen_ai.usage.input_tokens": 9
},
"events": [],
"links": [],
"resource": {
"attributes": {
"telemetry.sdk.language": "python",
"telemetry.sdk.name": "opentelemetry",
"telemetry.sdk.version": "1.27.0",
"telemetry.distro.name": "elastic",
"telemetry.distro.version": "0.2.0",
"process.runtime.description": "3.10.12 (main, Sep 11 2024, 15:47:36) [GCC 11.4.0]",
"process.runtime.name": "cpython",
"process.runtime.version": "3.10.12",
"os.type": "linux",
"os.version": "6.1.0-1034-oem",
"telemetry.auto.version": "0.48b0",
"service.name": "unknown_service"
},
"schema_url": ""
}
}1 parent 646ef3d commit e02823b
File tree
21 files changed
+2886
-239
lines changed- instrumentation/elastic-opentelemetry-instrumentation-openai
- src/opentelemetry/instrumentation/openai
- tests
- cassettes
21 files changed
+2886
-239
lines changedLines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
54 | 59 | | |
55 | 60 | | |
56 | 61 | | |
| |||
Lines changed: 74 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| 37 | + | |
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
| |||
95 | 97 | | |
96 | 98 | | |
97 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
98 | 110 | | |
99 | 111 | | |
100 | 112 | | |
| |||
103 | 115 | | |
104 | 116 | | |
105 | 117 | | |
| 118 | + | |
| 119 | + | |
106 | 120 | | |
107 | 121 | | |
108 | 122 | | |
| |||
226 | 240 | | |
227 | 241 | | |
228 | 242 | | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
Lines changed: 44 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
49 | 51 | | |
50 | 52 | | |
51 | 53 | | |
| |||
61 | 63 | | |
62 | 64 | | |
63 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
64 | 71 | | |
65 | 72 | | |
66 | 73 | | |
| |||
98 | 105 | | |
99 | 106 | | |
100 | 107 | | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
101 | 125 | | |
102 | 126 | | |
103 | 127 | | |
| |||
106 | 130 | | |
107 | 131 | | |
108 | 132 | | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
| 133 | + | |
119 | 134 | | |
120 | 135 | | |
121 | 136 | | |
| |||
135 | 150 | | |
136 | 151 | | |
137 | 152 | | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
138 | 169 | | |
139 | 170 | | |
140 | 171 | | |
| |||
154 | 185 | | |
155 | 186 | | |
156 | 187 | | |
157 | | - | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
158 | 191 | | |
159 | 192 | | |
160 | 193 | | |
| |||
0 commit comments