Skip to content

Conversation

lfventura
Copy link

@lfventura lfventura commented Sep 11, 2025

What does this PR do?

  • eventHubName is nowadays hardcoded, which was not before. This PR adds a new variable EVENTHUB_NAME were you can pass the eventhub name properly. If not set, defaults to the value that is currently hardcoded.
  • renames the function name from datadog-function to datadogFunction. -- if the function-name contains dashes, it causes random errors with azure api. ie.
    • deleting the function app and creating it again would show deleted code,
    • "Failed to disable datadog-function AppSetting with name 'AzureWebJobs.datadog-function.Disabled' is not allowed.
  • Those errors mostly happens when a function name has dashes on it. Relates to https://stackoverflow.com/a/66813465
  • Update Azure SDK
  • Update version to 2.1.1

Motivation

It should be compatible with users that were running older versions of this function.

Testing Guidelines

Ran in my Azure environment and logs were forwarded properly

Additional Notes

NA

Types of changes

  • Bug fix
  • New feature
  • Breaking change
  • Misc (docs, refactoring, dependency upgrade, etc.)

Check all that apply

  • This PR's description is comprehensive
  • This PR contains breaking changes that are documented in the description
  • This PR introduces new APIs or parameters that are documented and unlikely to change in the foreseeable future
  • This PR impacts documentation, and it has been updated (or a ticket has been logged)
  • This PR's changes are covered by the automated tests
  • This PR collects user input/sensitive content into Datadog
  • This PR passes the integration tests (ask a Datadog member to run the tests)
  • This PR passes the unit tests
  • This PR passes the installation tests (ask a Datadog member to run the tests)

@lfventura lfventura requested a review from a team as a code owner September 11, 2025 23:10
@lfventura lfventura requested a review from benjjs September 11, 2025 23:10
@lfventura lfventura changed the title Use variable instead of hardcoded value for eventHubName [azure] Use variable instead of hardcoded value for eventHubName Sep 11, 2025
@lfventura lfventura changed the title [azure] Use variable instead of hardcoded value for eventHubName [azure] Use variable instead of hardcoded value for eventHubName, fix potential deployment issue error Sep 12, 2025
@lfventura lfventura changed the title [azure] Use variable instead of hardcoded value for eventHubName, fix potential deployment issue error [azure] Use variable instead of hardcoded value for eventHubName, fix potential deployment issue error, update versions Sep 12, 2025
@benjjs benjjs requested review from mattsp1290 and removed request for benjjs September 12, 2025 14:06
@mattsp1290
Copy link
Member

This seems like a useful change. Thanks for putting in the work here! @lfventura could you remove the changes to the zip file from the commit? For security purposes we at Datadog will regenerate the zip.

@lfventura
Copy link
Author

Hi @mattsp1290 , changes to the zip file removed.

@mattsp1290
Copy link
Member

Apologies for the long tail on this. We will need to update the ARM templates as well to support this and need to find time to schedule that work. If you have bandwidth and domain knowledge to add those updates as well, the ARM template for this lives in https://github.com/DataDog/datadog-serverless-functions/tree/master/azure/eventhub_log_forwarder

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.

3 participants