-
Notifications
You must be signed in to change notification settings - Fork 351
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
allow tagFilter to use response data (#2607)
This change introduces a new filter tracingTagFromResponse that works just like the tracingTag filter, but is applied only after ther request has been processed. This allows using properties of the response (a header value) in the tag. The use case for this is that users might want to consider an operation as failed even if it technically succeeds, e.g. because fallbacks were used. With this change, a response header can be sent, e.g. `"X-Fallback": "true"`, and then the filter `tracingTagFromResponse("error", "${response.header.X-Fallback}")` would result in the span being marked as error. Another use cases could be that metrics should be captured by use case, but the use case is not apparent from the request and instead only defined by the result of the request processing. Signed-off-by: lukas-c-wilhelm <[email protected]>
- Loading branch information
1 parent
c62c064
commit 9ad6457
Showing
5 changed files
with
81 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1696,8 +1696,8 @@ Given following example ID token: | |
"email": "[email protected]", | ||
"groups": [ | ||
"CD-xyz", | ||
"appX-Test-Users" | ||
"Purchasing-Department", | ||
"appX-Test-Users", | ||
"Purchasing-Department" | ||
], | ||
"name": "Some One" | ||
} | ||
|
@@ -3013,6 +3013,10 @@ Example: Set tag from request header | |
tracingTag("http.flow_id", "${request.header.X-Flow-Id}") | ||
``` | ||
### tracingTagFromResponse | ||
This filter works just like [tracingTag](#tracingTag), but is applied after the request was processed. In particular, [template placeholders](#template-placeholders) referencing the response can be used in the parameters. | ||
### tracingSpanName | ||
This filter sets the name of the outgoing (client span) in opentracing. The default name is "proxy". Example: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters