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

Create new http.TargetServer shared across all HTTP Promtail Targets #9181

Closed
wants to merge 6 commits into from

Conversation

thepalbi
Copy link
Contributor

@thepalbi thepalbi commented Apr 18, 2023

What this PR does / why we need it:

This PR creates a wrapper around WeaveWorks HTTP server, to be able to re-use some common configuration all Promtail targets that expose and HTTP server do.

From all the targets: gcp logs push, heroku and lokipush expose and HTTP server, based on WeaveWorks. They all have some repeated logic that:

  • applies some defaults to the config
  • configures a metrics namespace
  • toggles instrumentation and some other stuff

By extracting a common TargetServer, we can share all that configuration procedure, delegating to each target itself configuring just the HTTP handlers..

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:
lokipush was not pulled in the new wrapped sever, since it handles some configurations differently. Leaving as a follow up.

Checklist

  • Reviewed the CONTRIBUTING.md guide (required)
  • Documentation added
  • Tests updated
  • CHANGELOG.md updated
  • Changes that require user attention or interaction to upgrade are documented in docs/sources/upgrading/_index.md

@thepalbi thepalbi marked this pull request as ready for review April 18, 2023 16:44
@thepalbi thepalbi requested a review from a team as a code owner April 18, 2023 16:44
@thepalbi
Copy link
Contributor Author

Closing in favour of grafana/agent#3581

@thepalbi thepalbi closed this Apr 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant