Skip to content
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 Heroku log drain host format check #203

Merged
merged 3 commits into from
Sep 1, 2022

Conversation

andygout
Copy link
Contributor

FTDCS-299

Jira card: https://financialtimes.atlassian.net/jira/software/c/projects/FTDCS/boards/1426?modal=detail&selectedIssue=FTDCS-299

Ref. Slack chat in which it was identified that the Heroku log drains for next-ads-api incorrectly prefixed its host param value with https:/ - Step 2.3 of the migration guide states that the host param value should be:

The Heroku app URL excluding the protocol and path (e.g. ft-next-article-eu.herokuapp.com)

Screenshot 2022-08-30 at 12 25 56

References:

@andygout andygout requested review from a team as code owners August 30, 2022 11:30
Copy link
Member

@alexmuller alexmuller left a comment

Choose a reason for hiding this comment

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

Question: could we be more prescriptive here and require that it exactly matches the format ${process.env.HEROKU_APP_NAME}.herokuapp.com?

This environment variable is provided by the dyno metadata (https://devcenter.heroku.com/articles/dyno-metadata) which we know we need to have in order to get process.env.HEROKU_APP_ID.

@rowanmanning
Copy link
Member

I forgot about that! I think that probs is a better shout, especially as we already have logic in place for validating that the environment variable is present. What a shame our beautiful RegExp isn't really needed 😄

Copy link
Member

@alexmuller alexmuller left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

@andygout andygout merged commit a791993 into main Sep 1, 2022
@andygout andygout deleted the add-heroku-log-drain-host-format-check branch September 1, 2022 08:14
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