Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HPCC4J-667 DFSClient: Request traceparents should use active span #777

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

jpmcmu
Copy link
Contributor

@jpmcmu jpmcmu commented Dec 3, 2024

  • Changed RowServiceInputStream to use the active span instead of the top level read span for the traceparent on requests

Signed-off-by: James McMullan [email protected]

Type of change:

  • This change is a bug fix (non-breaking change which fixes an issue).
  • This change is a new feature (non-breaking change which adds functionality).
  • This change is a breaking change (fix or feature that will cause existing behavior to change).

Checklist:

  • I have created a corresponding JIRA ticket for this submission
  • My code follows the code style of this project.
    • I have applied the Eclipse code-format template provided.
  • My change requires a change to the documentation.
    • I have updated the documentation accordingly, or...
    • I have created a JIRA ticket to update the documentation.
    • Any new interfaces or exported functions are appropriately commented.
  • I have read the HPCC Systems CONTRIBUTORS document (https://github.com/hpcc-systems/HPCC-Platform/wiki/Guide-for-contributors).
  • The change has been fully tested:
    • This change does not cause any existing JUnits to fail.
    • I have include JUnit coverage to test this change
    • I have performed system test and covered possible regressions and side effects.
  • I have given due consideration to all of the following potential concerns:
    • Scalability
    • Performance
    • Security
    • Thread-safety
    • Premature optimization
    • This change fixes the problem, not just the symptom

Testing:

Copy link

github-actions bot commented Dec 3, 2024

Jira Issue: https://hpccsystems.atlassian.net/browse/HPCC4J-667

Jirabot Action Result:
Workflow Transition To: Merge Pending
Updated PR

@jpmcmu jpmcmu requested a review from rpastrana December 3, 2024 14:32
Copy link
Member

@rpastrana rpastrana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jpmcmu a couple of comments

@@ -109,7 +109,7 @@ private static StreamContext constructStreamContext(FieldDef rd, FieldDef pRd, i
return ctx;
}

public static final int DEFAULT_READ_REQUEST_SPAN_BATCH_SIZE = 25;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be reverted

{
String traceContextHeader = null;
if (span != null) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor formatting issue

{
String traceContextHeader = null;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe getTraceParentHeader will return null if span == null, or invalid. It feels a little cleaner if we change all these call to gettraceparentheader to:

String traceContextHeader = org.hpccsystems.ws.client.utils.Utils.getTraceParentHeader(versionSpan);

{
String traceContextHeader = null;
if (span != null) {
traceContextHeader = org.hpccsystems.ws.client.utils.Utils.getTraceParentHeader(span);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe you noticed an issue where traceparentheader flags were inconsistent , is that still an issue we need to address?

@jpmcmu
Copy link
Contributor Author

jpmcmu commented Dec 4, 2024

Look into changing the default sampling flag in getTraceParentHeader() to 01

…span

- Changed RowServiceInputStream to use the active span instead of the top level read span for the traceparent on requests

Signed-off-by: James McMullan [email protected]
@jpmcmu
Copy link
Contributor Author

jpmcmu commented Dec 5, 2024

@rpastrana pushed up code review changes

Copy link
Member

@rpastrana rpastrana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jpmcmu looks fine, we'll tackle the inconsistent sampled flags with this jira: https://hpccsystems.atlassian.net/browse/HPCC4J-668

@rpastrana rpastrana merged commit 0346c92 into hpcc-systems:candidate-9.8.x Dec 10, 2024
4 of 6 checks passed
Copy link

Jirabot Action Result:
Added fix version: 9.8.46
Workflow Transition: 'Resolve issue'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants