-
Notifications
You must be signed in to change notification settings - Fork 154
feat: add tracer #107
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 tracer #107
Conversation
Reminder: review this first draft @alan-churley @saragerion |
Coverage after merging feature/tracer into main
Coverage Report
|
Coverage after merging feature/tracer into main
Coverage Report
|
Coverage after merging feature/tracer into main
Coverage Report
|
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.
Fantastic! Thanks for the great work 👏
I added some minor comments, but it already looks good to me.
// Reserved environment variables | ||
private awsExecutionEnv = 'AWS_EXECUTION_ENV'; | ||
private chaliceLocalVariable = 'AWS_CHALICE_CLI_MODE'; | ||
private samLocalVariable = 'AWS_SAM_LOCAL'; | ||
private xRayTraceIdVariable = '_X_AMZN_TRACE_ID'; |
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.
Minor: only AWS_EXECUTION_ENV and _X_AMZN_TRACE_ID are reserved env variables, see here:
https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-runtime
Also, chalice is a python library.
// Reserved environment variables | |
private awsExecutionEnv = 'AWS_EXECUTION_ENV'; | |
private chaliceLocalVariable = 'AWS_CHALICE_CLI_MODE'; | |
private samLocalVariable = 'AWS_SAM_LOCAL'; | |
private xRayTraceIdVariable = '_X_AMZN_TRACE_ID'; | |
// Reserved environment variables | |
private awsExecutionEnv = 'AWS_EXECUTION_ENV'; | |
private xRayTraceIdVariable = '_X_AMZN_TRACE_ID'; | |
// Additional environment variables | |
private samLocalVariable = 'AWS_SAM_LOCAL'; |
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.
Thank you, I like the proposed suggestion but I'll have to simply comment this section with // Environment variables
because the suggested ordering conflicts with the eslint@typescript-eslint/member-ordering
directive (samLocalVariable
should be declared before xRayTraceIdVariable
).
packages/tracing/tests/unit/config/EnvironmentVariablesService.test.ts
Outdated
Show resolved
Hide resolved
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.
Looks great :) amazing job andrea
Description of your changes
First draft of the Tracer module, would really appreciate some feedback especially (but not limited to) the unit tests.
How to verify this change
Related issues, RFCs
N/A
PR status
Is this ready for review?: NO
Is it a breaking change?: NO
Checklist
Breaking change checklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.