Skip to content

Implement trace origin header and propagation support#731

Merged
tylerbenson merged 2 commits into
masterfrom
tyler/synthetics
Feb 26, 2019
Merged

Implement trace origin header and propagation support#731
tylerbenson merged 2 commits into
masterfrom
tyler/synthetics

Conversation

@tylerbenson

Copy link
Copy Markdown
Contributor

Used by Synthetics to prioritize sampling.

@tylerbenson tylerbenson added this to the 0.25.0 milestone Feb 25, 2019
@tylerbenson
tylerbenson force-pushed the tyler/synthetics branch 2 times, most recently from b3c1c71 to af41c7e Compare February 25, 2019 23:52

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could you please explain why this is needed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I added that so I could run all the integration tests with a single command. I could remove it if you don't like it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No, I do not have a strong preference about it being there - but if you decide to keep it just please add a small comment explaining why it's there so later we know :)

@mar-kolya mar-kolya Feb 26, 2019

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe instead of doing one more special case here you could initialize origin inside this if statement:

if (parentContext instanceof TagContext) {
          tags.putAll(((TagContext) parentContext).getTags());
        }

This may simplify some of this code, I think - you might be able to set origin to null by default and then read it from context only if context supports this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I considered that, but thought this would be cleaner... I'll try reimplementing and see if that works better.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Was this a bug?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No, I reordered it so it was consistent with other parts of the code... (see deletion below.)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ah, I missed that, thanks!

@tylerbenson
tylerbenson merged commit 0cdc80a into master Feb 26, 2019
@tylerbenson
tylerbenson deleted the tyler/synthetics branch February 26, 2019 17:01
@mar-kolya
mar-kolya restored the tyler/synthetics branch March 1, 2019 16:18
@mar-kolya
mar-kolya deleted the tyler/synthetics branch March 1, 2019 16:36
@tylerbenson tylerbenson modified the milestones: 0.25.0, 0.24.1 Mar 15, 2019
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