-
Notifications
You must be signed in to change notification settings - Fork 7
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
[WIP] Adds Prometheus metrics to ODIS combiner daemon (Odis Combiner to k8s) #49
Merged
Merged
Changes from all commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
d79b6ae
WIP
alvarof2 0e4de57
endpoint
alvarof2 9ae7ff6
cloudbuild.yaml
alvarof2 1335a90
Add some counters and latency histogram
alvarof2 4b5ac14
Less buckets for Histograms
alvarof2 e2bb448
status code label in responses metric
alvarof2 256df86
More metrics
alvarof2 d65cff7
Latency Histograms names
alvarof2 8571d8a
errorsCaughtInEndpointHandler name
alvarof2 9501f50
Add increments to combinerErrors
alvarof2 6c1e09b
Add fullNodeLatency Histogram
alvarof2 78f0f19
Remove metric for all error types logged
alvarof2 63e6bc4
Merge branch 'alecps/odisCombinerk8s' into alvarof/prom-odisCombinerk8s
aaronmgdr 547b564
Remove metric for all error types logged in handlers.ts
alvarof2 90199ca
Merge branch 'alecps/odisCombinerk8s' into alvarof/prom-odisCombinerk8s
alvarof2 4973730
Dockerfile
alvarof2 84c24c8
Merge branch 'main' into alvarof/prom-odisCombinerk8s
alvarof2 ec7e561
Dockerfiles and sync to main
alvarof2 e351617
workflows
alvarof2 553954d
Merge branch 'main' into alvarof/prom-odisCombinerk8s
alvarof2 2170002
GH Action combiner
alvarof2 0302719
ODIS signer GH Action
alvarof2 1faa676
Lint
alvarof2 dd083eb
More metrics
alvarof2 59b271c
sigInconsistenciesErrors name
alvarof2 3f17970
Merge branch 'main' into alvarof/prom-odisCombinerk8s
alvarof2 9a436fb
Merge branch 'alecps/odisCombinerk8s' into alvarof/prom-odisCombinerk8s
alvarof2 c698d6f
Merge branch 'alecps/odisCombinerk8s' into alvarof/prom-odisCombinerk8s
alvarof2 4c00727
odis-signer-container
alvarof2 30a2c6a
K8S test URL
alvarof2 2153393
K8S contextName for tests
alvarof2 1be5b0d
Cloud Function proxy
alvarof2 f89d30f
Merge branch 'alecps/odisCombinerk8s' into alvarof/prom-odisCombinerk8s
alvarof2 b2249b6
Branch name
alvarof2 3d806f0
Merge branch 'alecps/odisCombinerk8s' into alvarof/prom-odisCombinerk8s
alvarof2 85baf6c
Total errors metric
alvarof2 e434409
Remove alfajoresstaging-k8s loadtest case
alvarof2 0085c0b
Merge branch 'alecps/odisCombinerk8s' into alvarof/prom-odisCombinerk8s
alvarof2 b51040a
Remove sha from GH Action name
alvarof2 169a8e4
alfajoresstaging = K8S testing
alvarof2 b123201
Alfajores K8S URL
alvarof2 d04bc9a
Mainnet K8S URL
alvarof2 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- | ||
name: Build ODIS combiner image | ||
|
||
on: | ||
push: | ||
paths: | ||
- 'dockerfiles/phone-number-privacy/Dockerfile-combiner' | ||
- 'packages/phone-number-privacy/combiner/**' | ||
branches: | ||
- main | ||
pull_request: | ||
paths: | ||
- 'dockerfiles/phone-number-privacy/Dockerfile-combiner' | ||
- 'packages/phone-number-privacy/combiner/**' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
odis-combiner-build-dev: | ||
uses: celo-org/reusable-workflows/.github/workflows/[email protected] | ||
name: Build us-west1-docker.pkg.dev/devopsre/dev-images/odis-combiner | ||
if: | | ||
github.ref != 'refs/heads/main' | ||
with: | ||
workload-id-provider: projects/1094498259535/locations/global/workloadIdentityPools/gh-social-connect/providers/github-by-repos | ||
service-account: '[email protected]' | ||
artifact-registry: us-west1-docker.pkg.dev/devopsre/dev-images/odis-combiner | ||
tag: ${{ github.sha }} | ||
context: . | ||
file: dockerfiles/phone-number-privacy/Dockerfile-combiner | ||
trivy: true | ||
|
||
odis-combiner-build: | ||
uses: celo-org/reusable-workflows/.github/workflows/[email protected] | ||
name: Build us-west1-docker.pkg.dev/devopsre/social-connect/odis-combiner | ||
if: | | ||
github.ref == 'refs/heads/main' | ||
with: | ||
workload-id-provider: projects/1094498259535/locations/global/workloadIdentityPools/gh-social-connect-main/providers/github-by-repos | ||
service-account: '[email protected]' | ||
artifact-registry: us-west1-docker.pkg.dev/devopsre/social-connect/odis-combiner | ||
tag: ${{ github.sha }} | ||
context: . | ||
file: dockerfiles/phone-number-privacy/Dockerfile-combiner | ||
trivy: true |
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,42 @@ | ||
##### Gathering dependencies | ||
FROM scratch AS packages | ||
|
||
# Copy phone-number-privacy package and its dependency closure. | ||
# Assemble all dependencies into the packages folder so the second stage can select whether to | ||
# include all packages, or just the phone-number-privacy packages. | ||
WORKDIR /celo-phone-number-privacy/ | ||
COPY packages/phone-number-privacy/combiner packages/phone-number-privacy/combiner | ||
COPY packages/phone-number-privacy/common packages/phone-number-privacy/common | ||
COPY packages/sdk/encrypted-backup packages/sdk/encrypted-backup | ||
COPY packages/sdk/identity packages/sdk/identity | ||
|
||
##### Main stage | ||
FROM node:18 | ||
LABEL org.opencontainers.image.authors="[email protected]" | ||
|
||
WORKDIR /celo-phone-number-privacy/ | ||
|
||
# Copy monorepo settings | ||
COPY lerna.json package.json yarn.lock ./ | ||
|
||
# Makes build fail if it doesn't copy git, will be removed after build | ||
COPY .git .git | ||
|
||
# Setting ONLY_PUBLISHED_DEPENDENCIES to true or any non-empty string results in only the | ||
# phone-number-privacy package being copied into the image, and therefore it will only build using | ||
# published dependencies. Setting ONLY_PUBLISHED_DEPENDENCIES to "" will copy in all dependecies. | ||
ARG ONLY_PUBLISHED_DEPENDENCIES="" | ||
ARG PACKAGE_SELECTOR=${ONLY_PUBLISHED_DEPENDENCIES:+phone-number-privacy/combiner} | ||
COPY --from=packages celo-phone-number-privacy/packages/${PACKAGE_SELECTOR} packages/${PACKAGE_SELECTOR} | ||
|
||
# Install dependencies and build. | ||
RUN yarn install --network-timeout 100000 --frozen-lockfile && yarn cache clean | ||
RUN yarn build | ||
|
||
RUN rm -r .git | ||
|
||
# Setup and run the combiner application. | ||
ENV NODE_ENV production | ||
WORKDIR /celo-phone-number-privacy/packages/phone-number-privacy/combiner | ||
EXPOSE 8080 | ||
ENTRYPOINT ["yarn", "start:docker"] |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is double counting I believe