Skip to content

Commit

Permalink
Add additional tags
Browse files Browse the repository at this point in the history
  • Loading branch information
adilhafeez committed Nov 15, 2024
1 parent 8e99a62 commit 1be6e85
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
28 changes: 28 additions & 0 deletions jaeger-tracing/envoy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,26 @@ static_resources:
collector_endpoint: "/api/v2/spans"
shared_span_context: false
collector_endpoint_version: HTTP_JSON

custom_tags:
- tag: tag_literal
literal:
value: literal value
- tag: tag_request_header
request_header:
name: ":path"
- tag: tag_env_hostname
environment:
name: "HOSTNAME"
- tag: tag_metadata
metadata:
kind:
request: {}
metadata_key:
key: custom_tag
path:
- key: tag_metadata

codec_type: AUTO
stat_prefix: ingress_http
route_config:
Expand All @@ -39,6 +59,14 @@ static_resources:
decorator:
operation: checkAvailability
http_filters:
- name: envoy.filters.http.lua
typed_config:
'@type': type.googleapis.com/envoy.extensions.filters.http.lua.v3.Lua
default_source_code:
inline_string: |
function envoy_on_request(response_handle)
response_handle:streamInfo():dynamicMetadata():set("custom_tag", "tag_metadata", "hello from lua")
end
- name: envoy.filters.http.router
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
Expand Down
2 changes: 2 additions & 0 deletions jaeger-tracing/example.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ calls to other services. In the sandbox we have provided, the simple ``aiohttp``
(see trace function in :download:`examples/shared/python/tracing/service.py <_include/shared/python/tracing/service.py>`) acting as service1 propagates
the trace headers while making an outbound call to service2.

This demo also show how you can use custom_tags to to attach additional tags to the spans.

Step 1: Build the sandbox
*************************

Expand Down

0 comments on commit 1be6e85

Please sign in to comment.