-
Notifications
You must be signed in to change notification settings - Fork 3
Add X-Ray daemon #14
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 X-Ray daemon #14
Conversation
93243a8
to
d049984
Compare
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.
LGTM 👍
just minor comments but nothing blocking.
cmd/localstack/xraydaemon.go
Outdated
xrayConfig.NoVerifySSL = util.Bool(true) // obvious | ||
xrayConfig.LocalMode = util.Bool(true) // skip EC2 metadata check | ||
xrayConfig.Region = GetEnvOrDie("AWS_REGION") | ||
xrayConfig.Logging.LogLevel = "dev" // TODO |
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.
When do we adjust that to avoid log spamming?
The daemon itself should be stable, this might just be interesting for debugging.
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 periodically logs Skipped telemetry data as no segments found
or the number of traces sent.
The PR description is not up-to-date anymore after the change we introduced for updating the X-Ray TraceId with every request. |
Could it be that the runtime starts before the X-Ray daemon due to async
|
Seems to be related to this issue here: aws/aws-xray-sdk-python#185 |
Adds the xray daemon as a dependency and starts the daemon asynchronously.
The daemon is stopped and recorded segments are flushed when init shuts down (see signal handler / shutdown funcs in sandbox).
It's not yet ideal, but it provides parity with the old xray implementation. For proper active & passive tracing with additional generated (sub-)segments we'll need to add a few more things
Other changes:
LOCALSTACK_INIT_LOG_LEVEL
internal variable for us to be able to configure the log level in the init binary without re-compiling. I don't think this will be the final setup, since I still want to rework the general log setup here, but it's kinda useful in the meantime.