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

feat: Add fingerprints array to span schema #392

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions node/packages/sdk-schema/test/unit/span.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ const testTracePayload = {
name: 'test',
startTimeUnixNano: longValue,
endTimeUnixNano: longValue,
fingerprints: [],
tags: {
aws: {
lambda: {
Expand Down
2 changes: 2 additions & 0 deletions node/packages/sdk/lib/trace-span.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ class TraceSpan {
output: this.output || undefined,
tags: this.tags,
customTags: objHasOwnProperty.call(this, 'customTags') ? this.customTags : undefined,
fingerprints: [],
};
}
toProtobufObject() {
Expand All @@ -176,6 +177,7 @@ class TraceSpan {
customTags: objHasOwnProperty.call(this, 'customTags')
? JSON.stringify(this.customTags)
: undefined,
fingerprints: [],
};
}
get spans() {
Expand Down
2 changes: 2 additions & 0 deletions node/packages/sdk/test/unit/lib/trace-span.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ describe('lib/trace-span.test.js', () => {
endTime: jsonValue.endTime,
tags: { foo: 12 },
customTags: { elo: 'marko' },
fingerprints: [],
});
});

Expand Down Expand Up @@ -170,6 +171,7 @@ describe('lib/trace-span.test.js', () => {
endTimeUnixNano: protoJson.endTimeUnixNano,
input: 'some input',
output: 'some output',
fingerprints: [],
tags: {
toptag: '1',
top: { nested: '2', deep: { nested: '3' } },
Expand Down
5 changes: 5 additions & 0 deletions proto/serverless/instrumentation/v1/trace.proto
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,9 @@ message Span {
// The optional custom tags to be set by the user
// This is expected to be a JSON object in string format.
optional string custom_tags = 13;

// Optional list of event fingerprints related to the span.
// This will most likely always be populated by ingest when looking at the events
// attached to the TracePayload
repeated string fingerprints = 14;
Danwakeem marked this conversation as resolved.
Show resolved Hide resolved
}