Skip to content

Commit 398d8a6

Browse files
committed
Add Spell Checker
* add a spell checker to ci * correct existing mistakes
1 parent 21ba633 commit 398d8a6

8 files changed

Lines changed: 57 additions & 11 deletions

File tree

.github/_typos.toml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Configuration for typos spell checker
2+
# See: https://github.com/crate-ci/typos
3+
4+
[default.extend-words]
5+
# "gauge" is correct for metrics (typos incorrectly suggests "gage")
6+
Gauge = "Gauge"
7+
gauge = "gauge"
8+
9+
[default]
10+
extend-ignore-re = [
11+
# Line ignore: // typos:disable-line or # typos:disable-line
12+
"(?Rm)^.*(#|//)\\s*typos:disable-line$",
13+
# Block ignore: // typos:off ... // typos:on
14+
"(?s)(#|//)\\s*typos:off.*?\\n\\s*(#|//)\\s*typos:on",
15+
# Next-line ignore: // typos:ignore-next-line
16+
"(#|//)\\s*typos:ignore-next-line\\n.*",
17+
]
18+
19+
[files]
20+
extend-exclude = [
21+
"*.pb.go",
22+
"*.gen.go",
23+
"**/testdata/**",
24+
"*.svg",
25+
"go.sum",
26+
]

.github/workflows/typos.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Spell Check
2+
3+
on:
4+
pull_request:
5+
6+
permissions:
7+
contents: read
8+
9+
jobs:
10+
typos:
11+
name: Check spelling
12+
runs-on: ubuntu-latest
13+
timeout-minutes: 5
14+
steps:
15+
- uses: actions/checkout@v6
16+
17+
- name: Check spelling with typos
18+
uses: crate-ci/typos@v1.28.4
19+
with:
20+
config: .github/_typos.toml

cloud/observability/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ sequenceDiagram
9595
Gathering ->> Temporal Server: scrape
9696
Gathering ->> Processing: push
9797
end
98-
Note right of Processing: Gathering is<br>gobally distributed<br>and pushed at<br>various times
98+
Note right of Processing: Gathering is<br>globally distributed<br>and pushed at<br>various times
9999
loop 30s interval
100100
Processing ->> Processing: aggregate
101101
Note right of Processing: Aggregation is over<br>a look back

cloud/observability/promql-to-dd-go/examples/datadog_dashboard.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@
420420
{
421421
"id": 6576468107016944,
422422
"definition": {
423-
"title": "StartWorkflowExecutino Latency",
423+
"title": "StartWorkflowExecution Latency",
424424
"title_size": "16",
425425
"title_align": "left",
426426
"show_legend": true,

cloud/observability/promql-to-dd-go/worker/utils_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func TestPromHistogramToDatadogGauge(t *testing.T) {
5757
},
5858
},
5959
{
60-
name: "contains NaN vlaues",
60+
name: "contains NaN values",
6161
metricName: "latency",
6262
quantile: 0.5,
6363
matrix: model.Matrix{

cloud/observability/promql-to-dd-ts/src/index.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -188,15 +188,15 @@ const queryPrometheusHistogram = async (
188188
return queryResponseDataSchema.parse(response.data).data
189189
}
190190

191-
const convertPrometheusHistogramToDatadogGuageSeries = (
191+
const convertPrometheusHistogramToDatadogGaugeSeries = (
192192
metricName: string,
193193
quantile: number,
194194
metricData: MetricData,
195195
): v2.MetricSeries[] =>
196196
metricData.result.map(prometheusMetric => ({
197197
// Make it easier for the datadog user to understand what this metric is
198198
metric: DATADOG_METRIC_PREFIX + metricName.split('_bucket')[0] + '_P' + quantile * 100,
199-
// Type 2 is a "guage" metric
199+
// Type 3 is a "gauge" metric
200200
type: 3,
201201
points: prometheusMetric.values.map(([timestamp, value]) => {
202202
return {
@@ -246,9 +246,9 @@ const main = async () => {
246246
),
247247
)).flat()
248248

249-
const guageSeries = (await Promise.all(histogramMetricNames.map(async metricName =>
249+
const gaugeSeries = (await Promise.all(histogramMetricNames.map(async metricName =>
250250
Promise.all(HISTOGRAM_QUANTILES.map(async quantile =>
251-
convertPrometheusHistogramToDatadogGuageSeries(
251+
convertPrometheusHistogramToDatadogGaugeSeries(
252252
metricName,
253253
quantile,
254254
await queryPrometheusHistogram(metricName, quantile, generateQueryWindow())
@@ -259,7 +259,7 @@ const main = async () => {
259259
console.log({ level: 'info', message: 'Submitting metrics to Datadog' })
260260
await datadogMetricsApi.submitMetrics({ body: { series: [
261261
...countSeries,
262-
...guageSeries,
262+
...gaugeSeries,
263263
]}})
264264

265265
console.log({ level: 'info', message: 'Pausing for 20s' })

cloud/observability/promql-to-dd.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
promql-to-dd.py - Import counters and histograms from prometheus api endpoint into datadog
44
55
While this demonstrates how to import prometheus api data using the datadog metrics API,
6-
there is a lot of room for improvement in terms of efficency and error handling.
6+
there is a lot of room for improvement in terms of efficiency and error handling.
77
88
To view this data in DataDog Metrics:
99
* use sum and as_rate for rate metrics
@@ -105,7 +105,7 @@ def retryable_submit_metrics(datadog_api: MetricsApi, body: MetricPayload):
105105

106106
def submit_datadog_series(datadog_api: MetricsApi, series: Iterable):
107107
print(f"{datetime.now()}: Ingesting {len(series)} series into DataDog")
108-
# submit 200 series at a time as a naieve optimization
108+
# submit 200 series at a time as a naive optimization
109109
# this could be tuned to submit upto 5MB of metrics
110110
# data compressed to a size of upto 512KB
111111
non_empty_responses = []

tls/tls-simple/generate-test-certs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# This scripts generates test keys and certificates for the sample.
2-
# In a production environment such artifacts should be genrated
2+
# In a production environment such artifacts should be generated
33
# by a proper certificate authority and handled in a secure manner.
44

55
CERTS_DIR=./certs

0 commit comments

Comments
 (0)