Skip to content

Commit c08a403

Browse files
committed
Add additional tags
Signed-off-by: Adil Hafeez <[email protected]>
1 parent 8e99a62 commit c08a403

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

jaeger-tracing/envoy.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,26 @@ static_resources:
2323
collector_endpoint: "/api/v2/spans"
2424
shared_span_context: false
2525
collector_endpoint_version: HTTP_JSON
26+
27+
custom_tags:
28+
- tag: tag_literal
29+
literal:
30+
value: literal value
31+
- tag: tag_request_header
32+
request_header:
33+
name: ":path"
34+
- tag: tag_env_hostname
35+
environment:
36+
name: "HOSTNAME"
37+
- tag: tag_metadata
38+
metadata:
39+
kind:
40+
request: {}
41+
metadata_key:
42+
key: custom_tag
43+
path:
44+
- key: tag_metadata
45+
2646
codec_type: AUTO
2747
stat_prefix: ingress_http
2848
route_config:
@@ -39,6 +59,14 @@ static_resources:
3959
decorator:
4060
operation: checkAvailability
4161
http_filters:
62+
- name: envoy.filters.http.lua
63+
typed_config:
64+
'@type': type.googleapis.com/envoy.extensions.filters.http.lua.v3.Lua
65+
default_source_code:
66+
inline_string: |
67+
function envoy_on_request(response_handle)
68+
response_handle:streamInfo():dynamicMetadata():set("custom_tag", "tag_metadata", "hello from lua")
69+
end
4270
- name: envoy.filters.http.router
4371
typed_config:
4472
"@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router

jaeger-tracing/example.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ calls to other services. In the sandbox we have provided, the simple ``aiohttp``
3636
(see trace function in :download:`examples/shared/python/tracing/service.py <_include/shared/python/tracing/service.py>`) acting as service1 propagates
3737
the trace headers while making an outbound call to service2.
3838

39+
This demo also show how you can use custom_tags to to attach additional tags to the spans.
40+
3941
Step 1: Build the sandbox
4042
*************************
4143

0 commit comments

Comments
 (0)