Skip to content

Conversation

lukasholzer
Copy link
Contributor

🎉 Thanks for submitting a pull request! 🎉

Summary

Fixes https://linear.app/netlify/issue/COM-684/trace-resource-name-and-trace-attributes
Fixes https://linear.app/netlify/issue/COM-806/change-service-name-for-nextjs-server-handler
provide the service name and version as variables to it.


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)

@lukasholzer lukasholzer requested review from a team as code owners June 25, 2024 13:30
@lukasholzer lukasholzer force-pushed the fix/use-new-serverless-functions-api-and-provide-generator-variable branch 2 times, most recently from 251dad4 to db0e8f7 Compare June 25, 2024 13:44
@@ -26,6 +26,15 @@ export interface EntryFile {
filename: string
}

export const kebabCase = (input: string): string =>
Copy link
Member

Choose a reason for hiding this comment

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

Why do we have to use kebab case for the service name? Is that important enough that warrants shipping our own implementation of a kebab case transformer?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, because Datadog has a special naming convention. Even @ signs, which are common in the generator, should not occur.

let serviceVersion: string | undefined

if (generator) {
const parts = generator.split('@')
Copy link
Member

Choose a reason for hiding this comment

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

Can we add a comment explaining what's going on here?

Copy link
Member

Choose a reason for hiding this comment

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

There's nothing forcing generator to include a version, so what if is something like @org/package? This logic will make serviceVersion contain org/package, which is not what we want?

@lukasholzer lukasholzer force-pushed the fix/use-new-serverless-functions-api-and-provide-generator-variable branch from db0e8f7 to f11fc4e Compare June 25, 2024 14:03
@lukasholzer lukasholzer mentioned this pull request Jun 25, 2024
provide the service name and version as variables to it.
@lukasholzer lukasholzer force-pushed the fix/use-new-serverless-functions-api-and-provide-generator-variable branch from f11fc4e to a6c39fc Compare June 25, 2024 14:14
@lukasholzer lukasholzer enabled auto-merge (squash) June 25, 2024 14:35
@lukasholzer lukasholzer merged commit 6e3c5f7 into main Jun 25, 2024
@lukasholzer lukasholzer deleted the fix/use-new-serverless-functions-api-and-provide-generator-variable branch June 25, 2024 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants