Skip to content

Commit aef650b

Browse files
committed
make fmt
1 parent 1f57bb7 commit aef650b

7 files changed

Lines changed: 58 additions & 58 deletions

File tree

src/BackgroundJobs.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -533,8 +533,8 @@ queryMonitorsTriggered queryMonitorIds = do
533533
else do
534534
if Just True
535535
== ( monitorE.warningThreshold <&> \warningThreshold ->
536-
(monitorE.triggerLessThan && monitorE.evalResult >= warningThreshold)
537-
|| (not monitorE.triggerLessThan && monitorE.evalResult <= warningThreshold)
536+
(monitorE.triggerLessThan && monitorE.evalResult >= warningThreshold)
537+
|| (not monitorE.triggerLessThan && monitorE.evalResult <= warningThreshold)
538538
)
539539
then handleQueryMonitorThreshold monitorE False
540540
else pass

src/Opentelemetry/OtlpServer.hs

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -205,13 +205,13 @@ processList msgs !attrs = checkpoint "processList" $ do
205205
!chunks = chunksOf chunkSize (zip [0 ..] decodedMsgs)
206206
processChunk chunk =
207207
[ case decodeResult of
208-
Left err -> (ackId, V.empty)
209-
Right logReq ->
210-
let !resourceLogs = V.force $ V.fromList $ logReq ^. PLF.resourceLogs
211-
!projectKeys = getLogAttributeValue "at-project-key" resourceLogs
212-
!relevantProjectIdsAndKeys = V.filter (\(k, _) -> k `V.elem` projectKeys) allProjectIdsAndKeys
213-
!logs = V.force $ V.concatMap (V.fromList . convertResourceLogsToOtelLogs projectCachesMap relevantProjectIdsAndKeys) resourceLogs
214-
in (ackId, logs)
208+
Left err -> (ackId, V.empty)
209+
Right logReq ->
210+
let !resourceLogs = V.force $ V.fromList $ logReq ^. PLF.resourceLogs
211+
!projectKeys = getLogAttributeValue "at-project-key" resourceLogs
212+
!relevantProjectIdsAndKeys = V.filter (\(k, _) -> k `V.elem` projectKeys) allProjectIdsAndKeys
213+
!logs = V.force $ V.concatMap (V.fromList . convertResourceLogsToOtelLogs projectCachesMap relevantProjectIdsAndKeys) resourceLogs
214+
in (ackId, logs)
215215
| (_, (ackId, decodeResult)) <- chunk
216216
]
217217

@@ -220,8 +220,8 @@ processList msgs !attrs = checkpoint "processList" $ do
220220
-- Log errors for failed decodings
221221
sequence_
222222
[ Log.logAttention
223-
"processList:logs: unable to parse logs service request"
224-
(createProtoErrorInfo err (snd $ msgs L.!! idx))
223+
"processList:logs: unable to parse logs service request"
224+
(createProtoErrorInfo err (snd $ msgs L.!! idx))
225225
| (idx, (_, Left err)) <- zip [0 ..] decodedMsgs
226226
]
227227

@@ -293,13 +293,13 @@ processList msgs !attrs = checkpoint "processList" $ do
293293
!chunks = chunksOf chunkSize (zip [0 ..] decodedMsgs)
294294
processChunk chunk =
295295
[ case decodeResult of
296-
Left err -> (ackId, V.empty)
297-
Right traceReq ->
298-
let !resourceSpans = V.force $ V.fromList $ traceReq ^. PTF.resourceSpans
299-
!projectKeys = getSpanAttributeValue "at-project-key" resourceSpans
300-
!relevantProjectIdsAndKeys = V.filter (\(k, _) -> k `V.elem` projectKeys) allProjectIdsAndKeys
301-
!spans = V.force $ V.fromList $ convertResourceSpansToOtelLogs projectCachesMap relevantProjectIdsAndKeys resourceSpans
302-
in (ackId, spans)
296+
Left err -> (ackId, V.empty)
297+
Right traceReq ->
298+
let !resourceSpans = V.force $ V.fromList $ traceReq ^. PTF.resourceSpans
299+
!projectKeys = getSpanAttributeValue "at-project-key" resourceSpans
300+
!relevantProjectIdsAndKeys = V.filter (\(k, _) -> k `V.elem` projectKeys) allProjectIdsAndKeys
301+
!spans = V.force $ V.fromList $ convertResourceSpansToOtelLogs projectCachesMap relevantProjectIdsAndKeys resourceSpans
302+
in (ackId, spans)
303303
| (_, (ackId, decodeResult)) <- chunk
304304
]
305305

@@ -308,8 +308,8 @@ processList msgs !attrs = checkpoint "processList" $ do
308308
-- Log errors for failed decodings
309309
sequence_
310310
[ Log.logAttention
311-
"processList:traces: unable to parse traces service request"
312-
(createProtoErrorInfo err (snd $ msgs L.!! idx))
311+
"processList:traces: unable to parse traces service request"
312+
(createProtoErrorInfo err (snd $ msgs L.!! idx))
313313
| (idx, (_, Left err)) <- zip [0 ..] decodedMsgs
314314
]
315315

src/Pages/Monitors/Alerts.hs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ monitorSelectType_ = section_ [class_ "px-8 py-5 space-y-5 group/pg"] do
602602
monitorTypeDetail_
603603
"Errors"
604604
$( THUtils.markdown
605-
[text|
605+
[text|
606606
Errors are groups of exceptions that have a similar stacktrace. Set an alert for new issues, when an issue changes state, frequency of errors, or users affected by an issue.
607607
![](/public/pages/monitors/alerts-wizard-issues.022643ec283774262884.svg)
608608
Examples
@@ -614,7 +614,7 @@ monitorSelectType_ = section_ [class_ "px-8 py-5 space-y-5 group/pg"] do
614614
monitorTypeDetail_
615615
"API changes"
616616
$( THUtils.markdown
617-
[text|
617+
[text|
618618
Errors are groups of exceptions that have a similar stacktrace. Set an alert for new issues, when an issue changes state, frequency of errors, or users affected by an issue.
619619
![](/public/pages/monitors/alerts-wizard-issues.022643ec283774262884.svg)
620620
Examples
@@ -626,7 +626,7 @@ monitorSelectType_ = section_ [class_ "px-8 py-5 space-y-5 group/pg"] do
626626
monitorTypeDetail_
627627
"Healthcheck/Pings"
628628
$( THUtils.markdown
629-
[text|
629+
[text|
630630
Errors are groups of exceptions that have a similar stacktrace. Set an alert for new issues, when an issue changes state, frequency of errors, or users affected by an issue.
631631
![](/public/pages/monitors/alerts-wizard-issues.022643ec283774262884.svg)
632632
Examples
@@ -638,7 +638,7 @@ monitorSelectType_ = section_ [class_ "px-8 py-5 space-y-5 group/pg"] do
638638
monitorTypeDetail_
639639
"Multistep API test"
640640
$( THUtils.markdown
641-
[text|
641+
[text|
642642
Errors are groups of exceptions that have a similar stacktrace. Set an alert for new issues, when an issue changes state, frequency of errors, or users affected by an issue.
643643
![](/public/pages/monitors/alerts-wizard-issues.022643ec283774262884.svg)
644644
Examples
@@ -650,7 +650,7 @@ monitorSelectType_ = section_ [class_ "px-8 py-5 space-y-5 group/pg"] do
650650
monitorTypeDetail_
651651
"Throughput"
652652
$( THUtils.markdown
653-
[text|
653+
[text|
654654
Errors are groups of exceptions that have a similar stacktrace. Set an alert for new issues, when an issue changes state, frequency of errors, or users affected by an issue.
655655
![](/public/pages/monitors/alerts-wizard-issues.022643ec283774262884.svg)
656656
Examples
@@ -662,7 +662,7 @@ monitorSelectType_ = section_ [class_ "px-8 py-5 space-y-5 group/pg"] do
662662
monitorTypeDetail_
663663
"Error Logs"
664664
$( THUtils.markdown
665-
[text|
665+
[text|
666666
Errors are groups of exceptions that have a similar stacktrace. Set an alert for new issues, when an issue changes state, frequency of errors, or users affected by an issue.
667667
![](/public/pages/monitors/alerts-wizard-issues.022643ec283774262884.svg)
668668
Examples

src/Pages/Monitors/MetricMonitors.hs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ monitorTypes =
7676
errorsContent, apiChangesContent, healthcheckContent, multistepApiTestContent, throughputContent, errorLogsContent :: Html ()
7777
errorsContent =
7878
$( THUtils.markdown
79-
[text|
79+
[text|
8080
Errors are groups of exceptions that have a similar stacktrace. Set an alert for new issues, when an issue changes state, frequency of errors, or users affected by an issue.
8181
![](/public/pages/monitors/alerts-wizard-issues.022643ec283774262884.svg)
8282
Examples
@@ -86,7 +86,7 @@ errorsContent =
8686
)
8787
apiChangesContent =
8888
$( THUtils.markdown
89-
[text|
89+
[text|
9090
Errors are groups of exceptions that have a similar stacktrace. Set an alert for new issues, when an issue changes state, frequency of errors, or users affected by an issue.
9191
![](/public/pages/monitors/alerts-wizard-issues.022643ec283774262884.svg)
9292
Examples
@@ -96,7 +96,7 @@ apiChangesContent =
9696
)
9797
healthcheckContent =
9898
$( THUtils.markdown
99-
[text|
99+
[text|
100100
Errors are groups of exceptions that have a similar stacktrace. Set an alert for new issues, when an issue changes state, frequency of errors, or users affected by an issue.
101101
![](/public/pages/monitors/alerts-wizard-issues.022643ec283774262884.svg)
102102
Examples
@@ -106,7 +106,7 @@ healthcheckContent =
106106
)
107107
multistepApiTestContent =
108108
$( THUtils.markdown
109-
[text|
109+
[text|
110110
Errors are groups of exceptions that have a similar stacktrace. Set an alert for new issues, when an issue changes state, frequency of errors, or users affected by an issue.
111111
![](/public/pages/monitors/alerts-wizard-issues.022643ec283774262884.svg)
112112
Examples
@@ -116,7 +116,7 @@ multistepApiTestContent =
116116
)
117117
throughputContent =
118118
$( THUtils.markdown
119-
[text|
119+
[text|
120120
Errors are groups of exceptions that have a similar stacktrace. Set an alert for new issues, when an issue changes state, frequency of errors, or users affected by an issue.
121121
![](/public/pages/monitors/alerts-wizard-issues.022643ec283774262884.svg)
122122
Examples
@@ -126,7 +126,7 @@ throughputContent =
126126
)
127127
errorLogsContent =
128128
$( THUtils.markdown
129-
[text|
129+
[text|
130130
Errors are groups of exceptions that have a similar stacktrace. Set an alert for new issues, when an issue changes state, frequency of errors, or users affected by an issue.
131131
![](/public/pages/monitors/alerts-wizard-issues.022643ec283774262884.svg)
132132
Examples

src/Pages/Telemetry/Trace.hs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -347,19 +347,19 @@ buildTree spanMap parentId =
347347
Nothing -> []
348348
Just spans ->
349349
[ SpanTree
350-
SpanMin
351-
{ parentSpanId = sp.parentSpanId
352-
, spanId = sp.spanId
353-
, uSpanId = sp.uSpanId
354-
, spanName = sp.spanName
355-
, spanDurationNs = sp.spanDurationNs
356-
, serviceName = getServiceName sp.resource
357-
, startTime = utcTimeToNanoseconds sp.startTime
358-
, endTime = utcTimeToNanoseconds <$> sp.endTime
359-
, hasErrors = spanHasErrors sp
360-
, timestamp = sp.timestamp
361-
}
362-
(buildTree spanMap (Just sp.spanId))
350+
SpanMin
351+
{ parentSpanId = sp.parentSpanId
352+
, spanId = sp.spanId
353+
, uSpanId = sp.uSpanId
354+
, spanName = sp.spanName
355+
, spanDurationNs = sp.spanDurationNs
356+
, serviceName = getServiceName sp.resource
357+
, startTime = utcTimeToNanoseconds sp.startTime
358+
, endTime = utcTimeToNanoseconds <$> sp.endTime
359+
, hasErrors = spanHasErrors sp
360+
, timestamp = sp.timestamp
361+
}
362+
(buildTree spanMap (Just sp.spanId))
363363
| sp <- spans
364364
]
365365

src/Pages/Telemetry/Utils.hs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,11 +160,11 @@ buildTree metricMap parentId =
160160
Nothing -> []
161161
Just metrics ->
162162
[ MetricTree
163-
MetricNode
164-
{ parent = mt.parent
165-
, current = mt.current
166-
}
167-
(buildTree metricMap (if mt.parent == "___root___" then Just mt.current else Just $ mt.parent <> "." <> mt.current))
163+
MetricNode
164+
{ parent = mt.parent
165+
, current = mt.current
166+
}
167+
(buildTree metricMap (if mt.parent == "___root___" then Just mt.current else Just $ mt.parent <> "." <> mt.current))
168168
| mt <- metrics
169169
]
170170

src/Web/Auth.hs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -189,10 +189,10 @@ loginRedirectH redirectToM = do
189189
loginH
190190
:: Maybe Text
191191
-> ATBaseCtx
192-
( Headers
193-
'[Header "Location" Text, Header "Set-Cookie" SetCookie]
194-
NoContent
195-
)
192+
( Headers
193+
'[Header "Location" Text, Header "Set-Cookie" SetCookie]
194+
NoContent
195+
)
196196
loginH redirectToM = do
197197
envCfg <- asks env
198198
stateVar <- liftIO $ UUID.toText <$> UUIDV4.nextRandom
@@ -209,10 +209,10 @@ authCallbackH
209209
-> Maybe Text -- state variable from auth0
210210
-> Maybe Text
211211
-> ATBaseCtx
212-
( Headers
213-
'[Header "Location" Text, Header "Set-Cookie" SetCookie]
214-
(Html ())
215-
)
212+
( Headers
213+
'[Header "Location" Text, Header "Set-Cookie" SetCookie]
214+
(Html ())
215+
)
216216
authCallbackH codeM _ redirectToM = do
217217
envCfg <- ask @AuthContext
218218
pool <- asks pool

0 commit comments

Comments
 (0)