forked from airbytehq/airbyte
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set up initial metrics reporter. (airbytehq#10408)
Part 1 of https://docs.google.com/document/d/11pEUsHyKUhh4CtV3aReau3SUG-ncEvy6ROJRVln6YB4/edit?usp=sharing. This is the initial set up of the reporter. Will add actual metrics in the follow up PR. Since the reporter is primarily for Cloud use and limited to DD to begin with, we are keeping it outside the regular Airbyte docker and Kube deploys for now. Add ReadMes to better define various modules.
- Loading branch information
Showing
11 changed files
with
72 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## Airbyte Metrics Lib | ||
|
||
This module contains helpers for emitting metrics. This is primarily intended to be consumed by Airbyte Cloud, though OSS users are certainly welcome to make sure of this. |
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
ARG JDK_VERSION=17.0.1 | ||
FROM openjdk:${JDK_VERSION}-slim AS scheduler | ||
|
||
ENV APPLICATION airbyte-metrics-reporter | ||
|
||
WORKDIR /app | ||
|
||
ADD bin/${APPLICATION}-0.35.30-alpha.tar /app | ||
|
||
# wait for upstream dependencies to become available before starting server | ||
ENTRYPOINT ["/bin/bash", "-c", "${APPLICATION}-0.35.30-alpha/bin/${APPLICATION}"] |
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,5 @@ | ||
## Airbyte Metrics Reporter | ||
|
||
The Reporter attempts to keep code clean by centralising metric calculation and submissions. | ||
|
||
This is primarily intended for Airbyte Cloud, though OSS users are certainly welcome to make use of this. |
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,27 @@ | ||
plugins { | ||
id 'application' | ||
} | ||
|
||
dependencies { | ||
implementation project(':airbyte-metrics:lib') | ||
} | ||
|
||
application { | ||
applicationName = "airbyte-metrics-reporter" | ||
mainClass = 'io.airbyte.metrics.reporter.ReporterApp' | ||
applicationDefaultJvmArgs = ['-XX:+ExitOnOutOfMemoryError', '-XX:MaxRAMPercentage=75.0'] | ||
} | ||
|
||
task copyGeneratedTar(type: Copy) { | ||
dependsOn copyDocker | ||
dependsOn distTar | ||
|
||
from('build/distributions') { | ||
include 'airbyte-metrics-reporter-*.tar' | ||
} | ||
into 'build/docker/bin' | ||
} | ||
|
||
Task dockerBuildTask = getDockerBuildTask("reporter", "$project.projectDir") | ||
dockerBuildTask.dependsOn(copyGeneratedTar) | ||
assemble.dependsOn(dockerBuildTask) |
15 changes: 15 additions & 0 deletions
15
airbyte-metrics/reporter/src/main/java/io/airbyte/metrics/reporter/ReporterApp.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,15 @@ | ||
/* | ||
* Copyright (c) 2021 Airbyte, Inc., all rights reserved. | ||
*/ | ||
|
||
package io.airbyte.metrics.reporter; | ||
|
||
import io.airbyte.metrics.lib.DogstatsdMetricSingleton; | ||
|
||
public class ReporterApp { | ||
|
||
public static void main(final String[] args) { | ||
DogstatsdMetricSingleton.initialize("airbyte-metrics-reporter", false); | ||
} | ||
|
||
} |
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