Skip to content

Commit 9281779

Browse files
committed
updated gateway to the new trace format
1 parent a8f0e64 commit 9281779

File tree

1 file changed

+40
-3
lines changed

1 file changed

+40
-3
lines changed

content/en/ninja-workshops/10-advanced-otel/20-gateway-setup/2-test-agent-gateway.md

Lines changed: 40 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ After executing the command, the gateway should generate a new file named `./gat
162162
{{% tab title="Compacted JSON" %}}
163163

164164
```json
165-
{"resourceSpans":[{"resource":{"attributes":[{"key":"service.name","value":{"stringValue":"my.service"}},{"key":"deployment.environment","value":{"stringValue":"my.environment"}},{"key":"host.name","value":{"stringValue":"YOUR_HOST_NAME"}},{"key":"os.type","value":{"stringValue":"YOUR_OS"}},{"key":"otelcol.service.mode","value":{"stringValue":"gateway"}}]},"scopeSpans":[{"scope":{"name":"my.library","version":"1.0.0","attributes":[{"key":"my.scope.attribute","value":{"stringValue":"some scope attribute"}}]},"spans":[{"traceId":"5b8efff798038103d269b633813fc60c","spanId":"eee19b7ec3c1b174","parentSpanId":"eee19b7ec3c1b173","name":"I'm a server span","kind":2,"startTimeUnixNano":"1544712660000000000","endTimeUnixNano":"1544712661000000000","attributes":[{"value":{"stringValue":"some value"}}],"status":{}}]}],"schemaUrl":"https://opentelemetry.io/schemas/1.6.1"}]}
165+
{"resourceSpans":[{"resource":{"attributes":[{"key":"service.name","value":{"stringValue":"my.service"}},{"key":"deployment.environment","value":{"stringValue":"my.environment"}},{"key":"host.name","value":{"stringValue":"[YOUR_HOST_NAME]"}},{"key":"os.type","value":{"stringValue":"[YOUR_OS]"}},{"key":"otelcol.service.mode","value":{"stringValue":"agent"}}]},"scopeSpans":[{"scope":{"name":"my.library","version":"1.0.0","attributes":[{"key":"my.scope.attribute","value":{"stringValue":"some scope attribute"}}]},"spans":[{"traceId":"5b8efff798038103d269b633813fc60c","spanId":"eee19b7ec3c1b174","parentSpanId":"eee19b7ec3c1b173","name":"I'm a server span","kind":2,"startTimeUnixNano":"1544712660000000000","endTimeUnixNano":"1544712661000000000","attributes":[{"key":"user.name","value":{"stringValue":"George Lucas"}},{"key":"user.phone_number","value":{"stringValue":"+1555-867-5309"}},{"key":"user.email","value":{"stringValue":"[email protected]"}},{"key":"user.account_password","value":{"stringValue":"LOTR\u003eStarWars1-2-3"}},{"key":"user.visa","value":{"stringValue":"4111 1111 1111 1111"}},{"key":"user.amex","value":{"stringValue":"3782 822463 10005"}},{"key":"user.mastercard","value":{"stringValue":"5555 5555 5555 4444"}}],"status":{}}]}],"schemaUrl":"https://opentelemetry.io/schemas/1.6.1"}]}
166166
```
167167

168168
{{% /tab %}}
@@ -201,7 +201,7 @@ After executing the command, the gateway should generate a new file named `./gat
201201
{
202202
"key": "otelcol.service.mode",
203203
"value": {
204-
"stringValue": "gateway"
204+
"stringValue": "agent"
205205
}
206206
}
207207
]
@@ -231,8 +231,45 @@ After executing the command, the gateway should generate a new file named `./gat
231231
"endTimeUnixNano": "1544712661000000000",
232232
"attributes": [
233233
{
234+
"key": "user.name",
235+
"value": {
236+
"stringValue": "George Lucas"
237+
}
238+
},
239+
{
240+
"key": "user.phone_number",
241+
"value": {
242+
"stringValue": "+1555-867-5309"
243+
}
244+
},
245+
{
246+
"key": "user.email",
247+
"value": {
248+
"stringValue": "[email protected]"
249+
}
250+
},
251+
{
252+
"key": "user.account_password",
253+
"value": {
254+
"stringValue": "LOTR>StarWars1-2-3"
255+
}
256+
},
257+
{
258+
"key": "user.visa",
259+
"value": {
260+
"stringValue": "4111 1111 1111 1111"
261+
}
262+
},
263+
{
264+
"key": "user.amex",
265+
"value": {
266+
"stringValue": "3782 822463 10005"
267+
}
268+
},
269+
{
270+
"key": "user.mastercard",
234271
"value": {
235-
"stringValue": "some value"
272+
"stringValue": "5555 5555 5555 4444"
236273
}
237274
}
238275
],

0 commit comments

Comments
 (0)