Skip to content

Commit

Permalink
HPCC-31508 Refactor Jtrace hpcc.*id attributes
Browse files Browse the repository at this point in the history
- Renames hpcc.globalid to id.global
- Renames hpcc.callerid to id.caller
- Renames hpcc.localid to id.local
- Updates README

Signed-off-by: Rodrigo Pastrana <[email protected]>
  • Loading branch information
rpastrana committed Apr 10, 2024
1 parent 3dfd161 commit 495a289
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions helm/examples/tracing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ Tracing information can be exported to various Open Telemetry compatible endpoin

Sample span reported as log event:
```console
00000165 MON EVT 2023-12-01 17:19:07.270 8 688 UNK "{ "name": "HTTPRequest", "trace_id": "891070fc4a9ef5a3751c19c555d7d4a8", "span_id": "23a47b5bb486ce58", "start": 1701451147269962337, "duration": 652093, "Attributes": {"http.request.method": "GET","hpcc.localid": "JJmSnTeFWTQL8ft9DcbYDK","hpcc.globalid": "JJmSnTedcRZ99RtnwWGwPN" } }""
00000165 MON EVT 2023-12-01 17:19:07.270 8 688 UNK "{ "name": "HTTPRequest", "trace_id": "891070fc4a9ef5a3751c19c555d7d4a8", "span_id": "23a47b5bb486ce58", "start": 1701451147269962337, "duration": 652093, "Attributes": {"http.request.method": "GET","hpcc.localid": "JJmSnTeFWTQL8ft9DcbYDK","id.global": "JJmSnTedcRZ99RtnwWGwPN" } }""
```

Each log statement includes a timestamp denoting the span start time, and a duration along with the span name, trace and span id, and any HPCC specific attribute such as legacy GlobalID (if any), HPCC CallerID (if any), LocalID (if any).
Expand All @@ -108,8 +108,8 @@ Sample exported span data:
"duration": 1002426,
"attributes": {
"http.request.method": "GET",
"hpcc.localid": "JJmvRRBJ1QYU8o4xe1sgxJ",
"hpcc.globalid": "JJmvRRBjnJGY6vgkjkAjJc"
"id.local": "JJmvRRBJ1QYU8o4xe1sgxJ",
"id.global": "JJmvRRBjnJGY6vgkjkAjJc"
},
"events": [
{
Expand Down
6 changes: 3 additions & 3 deletions system/jlib/jtrace.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ static constexpr const char *kGlobalIdHttpHeaderName = "Global-Id";
static constexpr const char *kCallerIdHttpHeaderName = "Caller-Id";
static constexpr const char *kLegacyGlobalIdHttpHeaderName = "HPCC-Global-Id";
static constexpr const char *kLegacyCallerIdHttpHeaderName = "HPCC-Caller-Id";
static constexpr const char *kGlobalIdOtelAttributeName = "hpcc.globalid";
static constexpr const char *kCallerIdOtelAttributeName = "hpcc.callerid";
static constexpr const char *kLocalIdIdOtelAttributeName = "hpcc.localid";
static constexpr const char *kGlobalIdOtelAttributeName = "id.global";
static constexpr const char *kCallerIdOtelAttributeName = "id.caller";
static constexpr const char *kLocalIdIdOtelAttributeName = "id.local";

enum class SpanLogFlags : unsigned
{
Expand Down

0 comments on commit 495a289

Please sign in to comment.