|
| 1 | +{ |
| 2 | + "log": { |
| 3 | + "_recordingName": "Test OpenAI instrumentation/should set cache read input tokens in span for responses with cached tokens", |
| 4 | + "creator": { |
| 5 | + "comment": "persister:fs", |
| 6 | + "name": "Polly.JS", |
| 7 | + "version": "6.0.6" |
| 8 | + }, |
| 9 | + "entries": [ |
| 10 | + { |
| 11 | + "_id": "c94800faf5cc7c077d6bd96c5e4196b9", |
| 12 | + "_order": 0, |
| 13 | + "cache": {}, |
| 14 | + "request": { |
| 15 | + "bodySize": 68, |
| 16 | + "cookies": [], |
| 17 | + "headers": [ |
| 18 | + { |
| 19 | + "_fromType": "array", |
| 20 | + "name": "accept", |
| 21 | + "value": "application/json" |
| 22 | + }, |
| 23 | + { |
| 24 | + "_fromType": "array", |
| 25 | + "name": "content-type", |
| 26 | + "value": "application/json" |
| 27 | + }, |
| 28 | + { |
| 29 | + "_fromType": "array", |
| 30 | + "name": "user-agent", |
| 31 | + "value": "OpenAI/JS 6.32.0" |
| 32 | + }, |
| 33 | + { |
| 34 | + "_fromType": "array", |
| 35 | + "name": "x-stainless-arch", |
| 36 | + "value": "arm64" |
| 37 | + }, |
| 38 | + { |
| 39 | + "_fromType": "array", |
| 40 | + "name": "x-stainless-lang", |
| 41 | + "value": "js" |
| 42 | + }, |
| 43 | + { |
| 44 | + "_fromType": "array", |
| 45 | + "name": "x-stainless-os", |
| 46 | + "value": "MacOS" |
| 47 | + }, |
| 48 | + { |
| 49 | + "_fromType": "array", |
| 50 | + "name": "x-stainless-package-version", |
| 51 | + "value": "6.32.0" |
| 52 | + }, |
| 53 | + { |
| 54 | + "_fromType": "array", |
| 55 | + "name": "x-stainless-retry-count", |
| 56 | + "value": "0" |
| 57 | + }, |
| 58 | + { |
| 59 | + "_fromType": "array", |
| 60 | + "name": "x-stainless-runtime", |
| 61 | + "value": "node" |
| 62 | + }, |
| 63 | + { |
| 64 | + "_fromType": "array", |
| 65 | + "name": "x-stainless-runtime-version", |
| 66 | + "value": "v22.22.1" |
| 67 | + }, |
| 68 | + { |
| 69 | + "_fromType": "array", |
| 70 | + "name": "content-length", |
| 71 | + "value": "68" |
| 72 | + }, |
| 73 | + { |
| 74 | + "_fromType": "array", |
| 75 | + "name": "accept-encoding", |
| 76 | + "value": "gzip,deflate" |
| 77 | + }, |
| 78 | + { |
| 79 | + "name": "host", |
| 80 | + "value": "api.openai.com" |
| 81 | + } |
| 82 | + ], |
| 83 | + "headersSize": 603, |
| 84 | + "httpVersion": "HTTP/1.1", |
| 85 | + "method": "POST", |
| 86 | + "postData": { |
| 87 | + "mimeType": "application/json", |
| 88 | + "params": [], |
| 89 | + "text": "{\"model\":\"gpt-4o-mini\",\"input\":\"Tell me a joke about OpenTelemetry\"}" |
| 90 | + }, |
| 91 | + "queryString": [], |
| 92 | + "url": "https://api.openai.com/v1/responses" |
| 93 | + }, |
| 94 | + "response": { |
| 95 | + "bodySize": 683, |
| 96 | + "content": { |
| 97 | + "encoding": "base64", |
| 98 | + "mimeType": "application/json", |
| 99 | + "size": 683, |
| 100 | + "text": "[\"H4sIAAAAAAAAE3VTTa/aMBD8K6kvvYCUEAqBS6X+gV4q9fCoosXZgB+O7dprWoT4713nAx5Pr7dkPLvrnRlfhWrEVngMrs43FVSrvCyxqhZYFnm+gqIqqqbIy3xZFZtFVW3k+suySIT1uizETNj9K0oaW1gTkDHpEQibGhgv1uvNZrUsinImAgHFwFxpO6eRKUzegzwdvI2G79GCDsiQ0lqZg9hehYMLeq5o8IzaOv6+zR7lzxOWM4HeW6abqPVMtB5/RzTyUjs0oOkitvlMKDOV1w0SKB0mvjKBfJSkeI0J6+BvbSO5SDXZEz4fkLW6lqAfLTrboObrHhzNl3beKaPmi3yxnOfreVGJgeAhjZhKhu5i+3IdrOjC4f9OLFbY5MmJTYm4BMBV1W4kypZb08VhqscQ4JBs+FBuaQ2hGeaNFdN++JeYAMZYglGEl18zoe3Bebsf/3rWVvw8XrJGNRkdMfvO8v5AjR2SZ3RyKttzDE5ZdNkfRcfEVD4D57SSffuvO7Mz31BCDJgpyl5joEzaqBvzmbIjmEZj338nyIPEnchsO7bR9oyfxI3v461OO0AIivflxRLowLMrqJ8cYm85W45zypnAp0wweFY2hnoKcZ2sGPzh3TtH3EQesT7h5UPcYxK1d5VjVHfYWX9hMVmBYM2Y5V76pN7QANvW+vtfiF0HfuzOGQ/QIl34Hqlvq/Ce6oD+rPj+pMaH0ULU1NttPU5rEnYuBS0mqJhsuwoe2UH/NZrfH/C8M/q9DSoJwhFqVOwSOuh3tDwwiRzJigGc0mBd/chHPgBumOijkWPSRaMC7HUfwNinky+gzNtXlV7vW+TxOFm4pHHzoJa3mXj3KBerd9Db+rsLd3re70ag78gyQZzEu86cZmiAgBvcbv8AWeFv5icFAAA=\"]" |
| 101 | + }, |
| 102 | + "cookies": [ |
| 103 | + { |
| 104 | + "domain": "api.openai.com", |
| 105 | + "expires": "2026-05-28T10:58:34.000Z", |
| 106 | + "httpOnly": true, |
| 107 | + "name": "__cf_bm", |
| 108 | + "path": "/", |
| 109 | + "sameSite": "None", |
| 110 | + "secure": true, |
| 111 | + "value": "02CMVzrPPcxsao2auj7Q.td6y5xqLQct1DB7tKaLl4k-1779964112.2245798-1.0.1.1-_860cJD87skJAAopXuTNqG3gDJwgmToosZSk2A2M0buYkEKbkrrcoTevp7KzXDybXITcuQ1e_I4qK28SXaCjtL9YCEQ32342Qfs9dcXfV4a92acSpN1WqeSWqGV1k9lG" |
| 112 | + } |
| 113 | + ], |
| 114 | + "headers": [ |
| 115 | + { |
| 116 | + "name": "date", |
| 117 | + "value": "Thu, 28 May 2026 10:28:34 GMT" |
| 118 | + }, |
| 119 | + { |
| 120 | + "name": "content-type", |
| 121 | + "value": "application/json" |
| 122 | + }, |
| 123 | + { |
| 124 | + "name": "transfer-encoding", |
| 125 | + "value": "chunked" |
| 126 | + }, |
| 127 | + { |
| 128 | + "name": "connection", |
| 129 | + "value": "keep-alive" |
| 130 | + }, |
| 131 | + { |
| 132 | + "name": "cf-ray", |
| 133 | + "value": "a02c92b568e47a08-TLV" |
| 134 | + }, |
| 135 | + { |
| 136 | + "name": "cf-cache-status", |
| 137 | + "value": "DYNAMIC" |
| 138 | + }, |
| 139 | + { |
| 140 | + "name": "server", |
| 141 | + "value": "cloudflare" |
| 142 | + }, |
| 143 | + { |
| 144 | + "name": "strict-transport-security", |
| 145 | + "value": "max-age=31536000; includeSubDomains; preload" |
| 146 | + }, |
| 147 | + { |
| 148 | + "name": "x-content-type-options", |
| 149 | + "value": "nosniff" |
| 150 | + }, |
| 151 | + { |
| 152 | + "name": "access-control-expose-headers", |
| 153 | + "value": "X-Request-ID, CF-Ray, CF-Ray" |
| 154 | + }, |
| 155 | + { |
| 156 | + "name": "openai-organization", |
| 157 | + "value": "traceloop" |
| 158 | + }, |
| 159 | + { |
| 160 | + "name": "openai-processing-ms", |
| 161 | + "value": "1884" |
| 162 | + }, |
| 163 | + { |
| 164 | + "name": "openai-project", |
| 165 | + "value": "proj_tzz1TbPPOXaf6j9tEkVUBIAa" |
| 166 | + }, |
| 167 | + { |
| 168 | + "name": "openai-version", |
| 169 | + "value": "2020-10-01" |
| 170 | + }, |
| 171 | + { |
| 172 | + "name": "x-ratelimit-limit-requests", |
| 173 | + "value": "30000" |
| 174 | + }, |
| 175 | + { |
| 176 | + "name": "x-ratelimit-limit-tokens", |
| 177 | + "value": "150000000" |
| 178 | + }, |
| 179 | + { |
| 180 | + "name": "x-ratelimit-remaining-requests", |
| 181 | + "value": "29999" |
| 182 | + }, |
| 183 | + { |
| 184 | + "name": "x-ratelimit-remaining-tokens", |
| 185 | + "value": "149999965" |
| 186 | + }, |
| 187 | + { |
| 188 | + "name": "x-ratelimit-reset-requests", |
| 189 | + "value": "2ms" |
| 190 | + }, |
| 191 | + { |
| 192 | + "name": "x-ratelimit-reset-tokens", |
| 193 | + "value": "0s" |
| 194 | + }, |
| 195 | + { |
| 196 | + "name": "x-request-id", |
| 197 | + "value": "req_d316447754b2412ea3db6327c8d438b3" |
| 198 | + }, |
| 199 | + { |
| 200 | + "_fromType": "array", |
| 201 | + "name": "set-cookie", |
| 202 | + "value": "__cf_bm=02CMVzrPPcxsao2auj7Q.td6y5xqLQct1DB7tKaLl4k-1779964112.2245798-1.0.1.1-_860cJD87skJAAopXuTNqG3gDJwgmToosZSk2A2M0buYkEKbkrrcoTevp7KzXDybXITcuQ1e_I4qK28SXaCjtL9YCEQ32342Qfs9dcXfV4a92acSpN1WqeSWqGV1k9lG; HttpOnly; SameSite=None; Secure; Path=/; Domain=api.openai.com; Expires=Thu, 28 May 2026 10:58:34 GMT" |
| 203 | + }, |
| 204 | + { |
| 205 | + "name": "content-encoding", |
| 206 | + "value": "gzip" |
| 207 | + }, |
| 208 | + { |
| 209 | + "name": "alt-svc", |
| 210 | + "value": "h3=\":443\"; ma=86400" |
| 211 | + } |
| 212 | + ], |
| 213 | + "headersSize": 1146, |
| 214 | + "httpVersion": "HTTP/1.1", |
| 215 | + "redirectURL": "", |
| 216 | + "status": 200, |
| 217 | + "statusText": "OK" |
| 218 | + }, |
| 219 | + "startedDateTime": "2026-05-28T10:28:31.988Z", |
| 220 | + "time": 2834, |
| 221 | + "timings": { |
| 222 | + "blocked": -1, |
| 223 | + "connect": -1, |
| 224 | + "dns": -1, |
| 225 | + "receive": 0, |
| 226 | + "send": 0, |
| 227 | + "ssl": -1, |
| 228 | + "wait": 2834 |
| 229 | + }, |
| 230 | + "_recordingName": "Test OpenAI instrumentation/should set cache read input tokens in span for responses with cached tokens" |
| 231 | + } |
| 232 | + ], |
| 233 | + "pages": [], |
| 234 | + "version": "1.2" |
| 235 | + } |
| 236 | +} |
0 commit comments