-
Notifications
You must be signed in to change notification settings - Fork 66
feat: setup open telemetry tracing #5083
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
Conversation
73ea0b1
to
0cc7348
Compare
This pull request adds or modifies JavaScript ( |
3dc8b31
to
2cceb3d
Compare
@@ -73,6 +74,8 @@ | |||
"@netlify/plugins-list": "^6.68.0", | |||
"@netlify/run-utils": "^5.1.1", | |||
"@netlify/zip-it-and-ship-it": "9.10.0", | |||
"@opentelemetry/api": "^1.4.1", | |||
"@opentelemetry/instrumentation-http": "^0.40.0", |
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.
Not sure how the upload step works between buildbot and build, but if it's uploading the files via HTTP from this process, this will get slightly noisy.
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.
The file/functions upload fully takes place in Buildbot. The HTTP calls we have within build should be mostly to our API (hence the auto instrumentation enabled for HTTP), however I'm happy to remove this for now while we add the initial integration and add it later on 👍
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.
The HTTP calls we have within build should be mostly to our API
Sounds good then! I just wanted to point out the potential issue, but if it doesn't make 10s of thousands of HTTP calls it's all good.
if (!options.enabled) return | ||
if (sdk) return | ||
|
||
sdk = new HoneycombSDK({ |
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.
I assume it will use the API key via the env var HONEYCOMB_API_KEY
. Is this set when we run the build script?
We should also make sure the key has limited permissions, probably only create events
.
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.
I assume it will use the API key via the env var HONEYCOMB_API_KEY.
No need, since we're using the collector this is all handled for us, we just need to ship it to the specific host.
- https://github.com/netlify/buildbot/blob/c8284ab508ec067beb7d47e5b235c223b4beb34f/_infra/terraform/buildbot-provisioning/helm/otel-collector.yaml.tpl#L16-L20
- https://github.com/netlify/buildbot/blob/c8284ab508ec067beb7d47e5b235c223b4beb34f/script/entrypoint.sh#L4-L10
- https://github.com/netlify/buildbot/blob/c8284ab508ec067beb7d47e5b235c223b4beb34f/script/run-build.sh#L113-L117
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
2fe4445
to
d051d76
Compare
d051d76
to
092fd3e
Compare
🎉 Thanks for submitting a pull request! 🎉
Summary
Related issue - https://github.com/netlify/buildbot/issues/2689 - this adds support for distributed tracing from Buildbot to Netlify build.
Some examples traces I've generated locally:
For us to review and ship your PR efficiently, please perform the following steps:
we can discuss the changes and get feedback from everyone that should be involved. If you`re fixing a typo or
something that`s on fire 🔥 (e.g. incident related), you can skip this step.
your code follows our style guide and passes our tests.
A picture of a cute animal (not mandatory, but encouraged)