Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ bench/trace-schemas/messages/

# Test artifacts
cardano-tracer/cardano-tracer-test
/cardano-tracer-test/
/kernel-resource-summary.json

# IntellIJ project folder
.idea/
Expand Down
10 changes: 10 additions & 0 deletions cardano-node.code-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"folders": [
{
"path": "."
},
{
"path": "../hermod-tracing"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
description: |
Add `alarms = Nothing` to the local `TracerConfig` construction so the project compiles against the new strict `alarms` field in `cardano-tracer`.
kind:
- bugfix
pr: 6664
project: cardano-testnet
1 change: 1 addition & 0 deletions cardano-testnet/src/Testnet/CardanoTracer.hs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ mkConfig CardanoTracerConf { testnetMagic, logFormat, prometheusIP } port logFil
, resourceFreq = Nothing
, ekgRequestFull = Nothing
, prometheusLabels = Nothing
, alarms = Nothing
}

-- | Data for working with a running @cardano-tracer@.
Expand Down
2 changes: 2 additions & 0 deletions cardano-tracer/bench/cardano-tracer-bench.hs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ main = do
, teStateDir = Nothing
, teMetricsHelp = []
, teTimeseriesHandle = Nothing
, teAlarmRegistry = Nothing
}

removePathForcibly root
Expand Down Expand Up @@ -118,6 +119,7 @@ main = do
, hasEKG = Nothing
, hasPrometheus = Nothing
, hasTimeseries = Nothing
, alarms = Nothing
, tlsCertificate = Nothing
, logging = NE.fromList [LoggingParams root FileMode format]
, rotation = Nothing
Expand Down
35 changes: 34 additions & 1 deletion cardano-tracer/cardano-tracer.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ license-files: LICENSE
build-type: Simple
extra-doc-files: README.md
CHANGELOG.md
data-files: test/alarms-smoke.sh

flag systemd
description: Enable systemd support.
Expand All @@ -30,6 +31,7 @@ common project-config
, GeneralizedNewtypeDeriving
, ImportQualifiedPost
, InstanceSigs
, NumericUnderscores
, ScopedTypeVariables
, StandaloneKindSignatures
, TypeApplications
Expand Down Expand Up @@ -61,6 +63,15 @@ library
Cardano.Tracer.Acceptors.Server
Cardano.Tracer.Acceptors.Utils

Cardano.Tracer.Handlers.Alarms.Auth
Cardano.Tracer.Handlers.Alarms.Consumers
Cardano.Tracer.Handlers.Alarms.Registry
Cardano.Tracer.Handlers.Alarms.Server
Cardano.Tracer.Handlers.Alarms.Store
Cardano.Tracer.Handlers.Alarms.TimeseriesRules
Cardano.Tracer.Handlers.Alarms.TraceRules
Cardano.Tracer.Handlers.Alarms.Types

Cardano.Tracer.Handlers.Logs.File
Cardano.Tracer.Handlers.Logs.Journal
Cardano.Tracer.Handlers.Logs.Rotator
Expand Down Expand Up @@ -122,6 +133,8 @@ library
, ekg-wai
, extra
, filepath
, http-client
, http-client-tls
, http-types
, mime-mail
, network
Expand Down Expand Up @@ -278,7 +291,9 @@ test-suite cardano-tracer-test

main-is: cardano-tracer-test.hs

other-modules: Cardano.Tracer.Test.Forwarder
other-modules: Cardano.Tracer.Test.Alarms.Tests
Cardano.Tracer.Test.Alarms.TimeseriesTests
Cardano.Tracer.Test.Forwarder
Cardano.Tracer.Test.DataPoint.Tests
Cardano.Tracer.Test.Logs.Tests
Cardano.Tracer.Test.Restart.Tests
Expand All @@ -288,6 +303,7 @@ test-suite cardano-tracer-test
build-depends: aeson
, async
, bytestring
, cardano-timeseries-io
, cardano-tracer
, cborg
, containers
Expand Down Expand Up @@ -379,6 +395,23 @@ test-suite cardano-tracer-test-ext
-rtsopts
-with-rtsopts=-N

test-suite cardano-tracer-alarms-smoke
import: project-config
type: exitcode-stdio-1.0
hs-source-dirs: test
main-is: alarms-smoke.hs

other-modules: Paths_cardano_tracer
autogen-modules: Paths_cardano_tracer

build-tool-depends: cardano-tracer:cardano-tracer

if os(windows)
buildable: False

build-depends: base
, process

benchmark cardano-tracer-bench
import: project-config
type: exitcode-stdio-1.0
Expand Down
38 changes: 38 additions & 0 deletions cardano-tracer/configuration/alarms-example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"networkMagic": 764824073,
"network": {
"tag": "AcceptAt",
"contents": "/tmp/forwarder.sock"
},
"logging": [
{
"logRoot": "/tmp/cardano-tracer-logs",
"logMode": "FileMode",
"logFormat": "ForMachine"
}
],
"alarms": {
"alEndpoint": {
"epHost": "127.0.0.1",
"epPort": 1234
},
"alAllowInsecure": true,
"alAuthentication": {
"aacProducers": [
{
"pcName": "hermod-bridge",
"pcTokenFile": null,
"pcSource": "hermod-recon"
}
],
"aacReaders": [
{
"rcName": "local-reader",
"rcTokenFile": "/tmp/cardano-tracer-alarms-demo/reader.token",
"rcAllowHistory": true
}
]
},
"alConsumers": []
}
}
Loading
Loading