-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3443 from ingef/release
Merge Release
- Loading branch information
Showing
59 changed files
with
1,081 additions
and
633 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
backend/src/main/java/com/bakdata/conquery/metrics/prometheus/PrometheusBundle.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package com.bakdata.conquery.metrics.prometheus; | ||
|
||
import com.bakdata.conquery.models.config.ConqueryConfig; | ||
import io.dropwizard.core.ConfiguredBundle; | ||
import io.dropwizard.core.setup.Bootstrap; | ||
import io.dropwizard.core.setup.Environment; | ||
import io.prometheus.client.CollectorRegistry; | ||
import io.prometheus.client.dropwizard.DropwizardExports; | ||
import io.prometheus.metrics.exporter.servlet.jakarta.PrometheusMetricsServlet; | ||
import io.prometheus.metrics.simpleclient.bridge.SimpleclientCollector; | ||
import org.eclipse.jetty.servlet.ServletHolder; | ||
|
||
public class PrometheusBundle implements ConfiguredBundle<ConqueryConfig> { | ||
|
||
@Override | ||
public void initialize(Bootstrap<?> bootstrap) { | ||
// Init simple_client https://www.robustperception.io/exposing-dropwizard-metrics-to-prometheus/ | ||
CollectorRegistry.defaultRegistry.register(new DropwizardExports(bootstrap.getMetricRegistry())); | ||
// Init client_java bridge: https://prometheus.github.io/client_java/migration/simpleclient/ | ||
SimpleclientCollector.builder().register(); | ||
} | ||
|
||
@Override | ||
public void run(ConqueryConfig configuration, Environment environment) throws Exception { | ||
|
||
environment.getAdminContext().addServlet(new ServletHolder(new PrometheusMetricsServlet()), "/metrics-prometheus"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
backend/src/main/java/com/bakdata/conquery/models/config/DatabaseConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package com.bakdata.conquery.models.config; | ||
|
||
import lombok.Builder; | ||
import lombok.Data; | ||
|
||
@Data | ||
@Builder | ||
public class DatabaseConfig { | ||
|
||
private static final String DEFAULT_PRIMARY_COLUMN = "pid"; | ||
|
||
private Dialect dialect; | ||
|
||
private String databaseUsername; | ||
|
||
private String databasePassword; | ||
|
||
private String jdbcConnectionUrl; | ||
|
||
@Builder.Default | ||
private String primaryColumn = DEFAULT_PRIMARY_COLUMN; | ||
|
||
} |
Oops, something went wrong.