Skip to content

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

Merged
merged 9 commits into from
Jun 27, 2023
Merged

feat: setup open telemetry tracing #5083

merged 9 commits into from
Jun 27, 2023

Conversation

JGAntunes
Copy link
Contributor

@JGAntunes JGAntunes commented Jun 16, 2023

🎉 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:

  • Open a bug/issue before writing your code 🧑‍💻. This ensures
    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.
  • Read the contribution guidelines 📖. This ensures
    your code follows our style guide and passes our tests.
  • Update or add tests (if any source code was changed or added) 🧪
  • Update or add documentation (if features were changed or added) 📝
  • Make sure the status checks below are successful ✅

A picture of a cute animal (not mandatory, but encouraged)

Sorry, something went wrong.

@JGAntunes JGAntunes force-pushed the chore/setup-otel-tracing branch from 73ea0b1 to 0cc7348 Compare June 16, 2023 16:04
@github-actions
Copy link
Contributor

This pull request adds or modifies JavaScript (.js, .cjs, .mjs) files.
Consider converting them to TypeScript.

@JGAntunes JGAntunes force-pushed the chore/setup-otel-tracing branch from 3dc8b31 to 2cceb3d Compare June 23, 2023 14:34
@JGAntunes JGAntunes marked this pull request as ready for review June 23, 2023 15:16
@JGAntunes JGAntunes requested a review from a team as a code owner June 23, 2023 15:16
@@ -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",
Copy link

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.

Copy link
Contributor Author

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 👍

Copy link

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({
Copy link

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

jobala
jobala previously approved these changes Jun 26, 2023
Copy link
Contributor

@jobala jobala left a comment

Choose a reason for hiding this comment

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

LGTM

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@JGAntunes JGAntunes force-pushed the chore/setup-otel-tracing branch from d051d76 to 092fd3e Compare June 27, 2023 15:02
@JGAntunes JGAntunes requested review from jobala and julienp June 27, 2023 15:04
@JGAntunes JGAntunes self-assigned this Jun 27, 2023
@kodiakhq kodiakhq bot merged commit 1d66a80 into main Jun 27, 2023
@kodiakhq kodiakhq bot deleted the chore/setup-otel-tracing branch June 27, 2023 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants