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

feat(telemetry): instrument rafiki #2299

Merged
merged 67 commits into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
4e8101d
feat(telemetry): add opentelemetry and instrument rafiki.
beniaminmunteanu Nov 23, 2023
4ee5dda
feat(telemetry): move transaction_amount metric into ilp connector.
beniaminmunteanu Nov 24, 2023
ec31fad
chore(telemetry): format
beniaminmunteanu Nov 24, 2023
f0e9e33
feat(telemetry): go back to usual DI implementation
beniaminmunteanu Nov 24, 2023
31402d6
feat(telemetry): remove collector methods from telemetry service & re…
beniaminmunteanu Nov 24, 2023
8cc1f98
feat(telemetry): use already existing env variable (instance_name)
beniaminmunteanu Nov 27, 2023
cfcc091
feat(telemetry): move transactions_total metric to outgoing payment i…
beniaminmunteanu Nov 27, 2023
fdd41d7
feat(telemetry): telemetry now has it's own middleware instead of inj…
beniaminmunteanu Nov 27, 2023
26d9526
feat(telemetry): add unit tests for ILP Connector telemetry middleware
beniaminmunteanu Nov 29, 2023
783d548
feat(telemetry):remove clog
beniaminmunteanu Nov 29, 2023
5a99206
feat(telemetry): add telemetry middleware and service tests
beniaminmunteanu Dec 4, 2023
29bcd07
feat(telemetry): mock TelemetryService in createTestApp
beniaminmunteanu Dec 4, 2023
770573f
feat(telemetry): fix DI of middleware. Add condition for early return…
beniaminmunteanu Dec 4, 2023
126f0da
feat(telemetry): move telemetry middleware after createStreamControll…
beniaminmunteanu Dec 4, 2023
603fbe1
feat(telemetry): telemetry service now supports sending metrics to mu…
beniaminmunteanu Dec 11, 2023
67f279b
feat:(telemetry): remove asset_code information from transactions_amo…
beniaminmunteanu Dec 11, 2023
44645cb
feat(telemetry): add rates service that uses external rates
beniaminmunteanu Dec 21, 2023
a7c895e
feat(telemetry): add privacy
beniaminmunteanu Dec 21, 2023
0356ada
feat(telemetry): rephrase md
beniaminmunteanu Dec 21, 2023
503b6d2
feat(telemetry): extract privacy as a separate module
beniaminmunteanu Dec 23, 2023
c29f62f
feat(telemetry): add tests
beniaminmunteanu Dec 23, 2023
8ae1660
feat(telemetry): remove hostPort
beniaminmunteanu Dec 23, 2023
4a910f9
feat(telemetry): cleanup & add tesets
beniaminmunteanu Dec 23, 2023
87161b8
feat(telemetry): change privacy doc wording
beniaminmunteanu Jan 2, 2024
01ba59a
feat(telemetry): Remove local otel collector setup from cloud-nine an…
beniaminmunteanu Jan 6, 2024
7770f8f
feat(telemetry): prioritize ase provided exchange rates before extern…
beniaminmunteanu Jan 8, 2024
de49bf3
feat(telemetry): openTelemetryCollectors env var now has a default
beniaminmunteanu Jan 8, 2024
2357e01
feat(telemetry): remove source from amount metrics for privacy concerns
beniaminmunteanu Jan 8, 2024
b1b1489
feat(telemetry): add exchange rates retrieval lambda to codebase
beniaminmunteanu Jan 9, 2024
b50cfcf
feat(telemetry): docs
beniaminmunteanu Jan 9, 2024
79aff6c
Resolve documentation issues
huijing Jan 9, 2024
ed2aff8
feat(telemetry): move back from ILP connector to accounting service
beniaminmunteanu Jan 13, 2024
ff63f80
feat(telemetry): base asset code no longer externally configurable
beniaminmunteanu Jan 13, 2024
19183c5
feat(telemetry): leftover of last commit
beniaminmunteanu Jan 13, 2024
86a569a
feat(telemetry): some docs changes
beniaminmunteanu Jan 29, 2024
c528ab8
feat(telemetry):docs changes
beniaminmunteanu Jan 29, 2024
f171026
feat(telemetry):docs
beniaminmunteanu Jan 29, 2024
223e89f
feat(telemetry):more docs changes
beniaminmunteanu Jan 29, 2024
ff70532
feat(telemetry): remove leftover mock
beniaminmunteanu Jan 29, 2024
48631ff
feat(telemetry): Move conversion in telemetry & update DI accordingly.
beniaminmunteanu Jan 29, 2024
73f3f83
feat(telemetry): docs - create new integration section
beniaminmunteanu Jan 29, 2024
eb7e189
feat(telemetry): logger DI - add BaseAccountingServiceDependencies in…
beniaminmunteanu Feb 1, 2024
8f9ec36
feat(telemetry): telemetry optional in the AppServices interface
beniaminmunteanu Feb 1, 2024
0896717
docs(telemetry): remove collection implementation details
beniaminmunteanu Feb 1, 2024
7232209
feat(telemetry): cleanup
beniaminmunteanu Feb 2, 2024
bf092bb
feat(telemetry):testing- telemetry service tests now properly mock ot…
beniaminmunteanu Feb 2, 2024
8d38726
feat(telemetry): opt out of otel sdk periodic logging on periodic exp…
beniaminmunteanu Feb 2, 2024
b4dec15
feat(telemetry): meter provider shutdown exposed in telemetryService …
beniaminmunteanu Feb 2, 2024
1e3e678
feat(telemetry): tests now provide empty list of collector url's, so …
beniaminmunteanu Feb 2, 2024
8b90d53
feat(telemetry): tests now no longer need to mock exporters, as they …
beniaminmunteanu Feb 2, 2024
ed1f86b
feat(telemetry): code review cleanup
beniaminmunteanu Feb 4, 2024
ac83b25
feat(telemetry): docs updates
beniaminmunteanu Feb 6, 2024
7e09fb3
feat(telemetry): docs improvements
beniaminmunteanu Feb 8, 2024
05e308b
fix(telemetry):docs link
beniaminmunteanu Feb 8, 2024
a2d007b
feat(telemetry): docs change
beniaminmunteanu Feb 8, 2024
e6b06e5
feat(telemetry): fix docs link
beniaminmunteanu Feb 12, 2024
08d8efa
feat(telemetry): fix seed not having peeringAsset
beniaminmunteanu Feb 13, 2024
482aa67
feat(telemetry): remove unused aseRatesService
beniaminmunteanu Feb 14, 2024
a91c5d4
feat(telemetry): rename fallbackRates to internalRates
beniaminmunteanu Feb 14, 2024
409f2e1
feat(telemetry): added comments for privacy implementation + added a …
beniaminmunteanu Feb 14, 2024
a7f0a3f
feat(telemetry): remove testing clog
beniaminmunteanu Feb 15, 2024
b59814a
feaet(telemetry): remove telemetry from localenv
beniaminmunteanu Feb 19, 2024
3a9b8ff
feat(telemetry): enableTelemetry defaults to false
beniaminmunteanu Feb 19, 2024
efe4c52
feat(telemetry): turn default telemetry back on, but off on localenv
beniaminmunteanu Feb 19, 2024
395c86a
feat(telemetry): add distinction between livenet and testnet
beniaminmunteanu Feb 21, 2024
1c759e3
feat(telemetry): update docs to new LIVENET env variable
beniaminmunteanu Feb 21, 2024
8135aac
feat(telemetry): plural on OPEN_TELEMETRY_COLLECTOR_URLS
beniaminmunteanu Feb 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions packages/backend/src/config/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,15 @@ dotenv.config({
export const Config = {
logLevel: envString('LOG_LEVEL', 'info'),
enableTelemetry: envBool('ENABLE_TELEMETRY', true),
openTelemetryCollectors: envStringArray('OPEN_TELEMETRY_COLLECTOR_URL', [
'http://otel-collector-NLB-e3172ff9d2f4bc8a.elb.eu-west-2.amazonaws.com:4317'
]),
livenet: envBool('LIVENET', false),
openTelemetryCollectors: envStringArray(
'OPEN_TELEMETRY_COLLECTOR_URL',
beniaminmunteanu marked this conversation as resolved.
Show resolved Hide resolved
process.env.LIVENET
? []
: [
'http://otel-collector-NLB-e3172ff9d2f4bc8a.elb.eu-west-2.amazonaws.com:4317'
]
),
openTelemetryExportInterval: envInt('OPEN_TELEMETRY_EXPORT_INTERVAL', 15000),
telemetryExchangeRatesUrl: envString(
'TELEMETRY_EXCHANGE_RATES_URL',
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ export function initIocContainer(
const config = await deps.use('config')

let telemetry: TelemetryService | undefined
if (config.enableTelemetry) {
if (config.enableTelemetry && config.openTelemetryCollectors.length > 0) {
telemetry = await deps.use('telemetry')
}

Expand Down
beniaminmunteanu marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ In order to do so, the integrating ASE must deploy its own OpenTelemetry collect
## Rafiki Telemetry Environment Variables
beniaminmunteanu marked this conversation as resolved.
Show resolved Hide resolved

- `ENABLE_TELEMETRY`: boolean, defaults to `true`. Enables the telemetry service on Rafiki.
- `LIVENET`: boolean. Should be set to `true` on production environments. If it is not set, it will default to `false`, and metrics will get sent to the testnet otel-collector
beniaminmunteanu marked this conversation as resolved.
Show resolved Hide resolved
- `OPEN_TELEMETRY_COLLECTOR_URL`: CSV of URLs for Open Telemetry collectors (e.g., `http://otel-collector-NLB-e3172ff9d2f4bc8a.elb.eu-west-2.amazonaws.com:4317,http://happy-life-otel-collector:4317`).
- `OPEN_TELEMETRY_EXPORT_INTERVAL`: number in milliseconds, defaults to `15000`. Defines how often the instrumented Rafiki instance should send metrics.
- `TELEMETRY_EXCHANGE_RATES_URL`: string URL, defaults to `https://telemetry-exchange-rates.s3.amazonaws.com/exchange-rates-usd.json`. It defines the endpoint that Rafiki will query for exchange rates, as a fallback when ASE does not [provide them](/integration/getting-started/#exchange-rates). If set, the response format of the external exchange rates API should be of type Rates, as the rates service expects.
Expand Down
Loading