-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add links and events to tracing payload #21
Merged
Merged
Changes from 3 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
017e400
add links
ie-pham 61a9688
remove test artifact
ie-pham 58a4aa5
add templated events and links
ie-pham 39a488a
use random factor for rates & merge defaults+random
ie-pham cd0d018
making linking to previous span a default until we can support specif…
ie-pham 723b5d8
lint
ie-pham dcc463e
fix template example, rename defaults
ie-pham c24f7d9
oops forgot to undo testing
ie-pham File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
|
@@ -21,7 +21,9 @@ const client = new tracing.Client({ | |
const traceDefaults = { | ||
attributeSemantics: tracing.SEMANTICS_HTTP, | ||
attributes: {"one": "three"}, | ||
randomAttributes: {count: 2, cardinality: 5} | ||
randomAttributes: {count: 2, cardinality: 5}, | ||
eventDefaults: {generateExceptionOnError: true, count: 1.0, randomAttributes: {count: 2, cardinality: 3}}, | ||
linkDefaults: {linkToPreviousSpanIndex: true, count: 1.0, randomAttributes: {count: 2, cardinality: 3}}, | ||
} | ||
|
||
const traceTemplates = [ | ||
|
@@ -63,6 +65,16 @@ const traceTemplates = [ | |
{service: "auth-service", name: "authenticate", attributes: {"http.status_code": 403}}, | ||
] | ||
}, | ||
{ | ||
defaults: traceDefaults, | ||
spans: [ | ||
{service: "shop-backend", attributes: {"http.status_code": 403}}, | ||
{service: "shop-backend", name: "authenticate", attributes: {"http.request.header.accept": ["application/json"]}}, | ||
{service: "auth-service", name: "authenticate", attributes: {"http.status_code": 403}}, | ||
{service: "test-random", name: "events", randomEvents: {exceptionCount: 1, count: 2, randomAttributes: {count: 5, cardinality: 2}}}, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In this template the span and service names etc. mimic traces from a somewhat plausible e-commerce service landscape. It would be good to keep this and choose less generic service (test-random) and span names (links, events) here |
||
{service: "test-random", name: "links", randomLinks: {linkToPreviousSpanIndex: true, count: 2, randomAttributes: {count: 3, cardinality: 2}}} | ||
] | ||
}, | ||
] | ||
|
||
export default function () { | ||
|
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like this was not adjusted to the latest changes