Skip to content

Add class documentation FunctionSegmentNotDefinedErrorunexpected and make end_time optional #845

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

Merged
merged 2 commits into from
May 10, 2022
Merged
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
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* Thrown when the function segement (AWS::Lambda::Function) is not found in a trace.
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit

Suggested change
* Thrown when the function segement (AWS::Lambda::Function) is not found in a trace.
* Thrown when the function segment (AWS::Lambda::Function) is not found in a trace.

*
* X-Ray segments are process asynchronously. They may not be available even after
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* X-Ray segments are process asynchronously. They may not be available even after
* X-Ray segments are processed asynchronously. They may not be available even after

* the trace has already appeared. In that case, the function segment may be missing.
* We will throw this error to notify caller.
*/
export class FunctionSegmentNotDefinedError extends Error {
public constructor(msg: string) {
super(msg);
Expand Down
2 changes: 1 addition & 1 deletion packages/tracing/tests/helpers/tracesUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ interface ParsedDocument {
name: string
id: string
start_time: number
end_time: number
end_time?: number
// This flag may be set if the segment hasn't been fully processed
// The trace may have already appeared in the `getTraceSummaries` response
// but a segment may still be in_progress
Expand Down