Skip to content
Open
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
26 changes: 26 additions & 0 deletions .github/_typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Configuration for typos spell checker
# See: https://github.com/crate-ci/typos

[default.extend-words]
# "gauge" is correct for metrics (typos incorrectly suggests "gage")
Gauge = "Gauge"
gauge = "gauge"

[default]
extend-ignore-re = [
# Line ignore: // typos:disable-line or # typos:disable-line
"(?Rm)^.*(#|//)\\s*typos:disable-line$",
# Block ignore: // typos:off ... // typos:on
"(?s)(#|//)\\s*typos:off.*?\\n\\s*(#|//)\\s*typos:on",
# Next-line ignore: // typos:ignore-next-line
"(#|//)\\s*typos:ignore-next-line\\n.*",
]

[files]
extend-exclude = [
"*.pb.go",
"*.gen.go",
"**/testdata/**",
"*.svg",
"go.sum",
]
20 changes: 20 additions & 0 deletions .github/workflows/typos.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Spell Check

on:
pull_request:

permissions:
contents: read

jobs:
typos:
name: Check spelling
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v6

- name: Check spelling with typos
uses: crate-ci/[email protected]
with:
config: .github/_typos.toml
2 changes: 1 addition & 1 deletion cloud/observability/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ sequenceDiagram
Gathering ->> Temporal Server: scrape
Gathering ->> Processing: push
end
Note right of Processing: Gathering is<br>gobally distributed<br>and pushed at<br>various times
Note right of Processing: Gathering is<br>globally distributed<br>and pushed at<br>various times
loop 30s interval
Processing ->> Processing: aggregate
Note right of Processing: Aggregation is over<br>a look back
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@
{
"id": 6576468107016944,
"definition": {
"title": "StartWorkflowExecutino Latency",
"title": "StartWorkflowExecution Latency",
"title_size": "16",
"title_align": "left",
"show_legend": true,
Expand Down
2 changes: 1 addition & 1 deletion cloud/observability/promql-to-dd-go/worker/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func TestPromHistogramToDatadogGauge(t *testing.T) {
},
},
{
name: "contains NaN vlaues",
name: "contains NaN values",
metricName: "latency",
quantile: 0.5,
matrix: model.Matrix{
Expand Down
10 changes: 5 additions & 5 deletions cloud/observability/promql-to-dd-ts/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,15 +188,15 @@ const queryPrometheusHistogram = async (
return queryResponseDataSchema.parse(response.data).data
}

const convertPrometheusHistogramToDatadogGuageSeries = (
const convertPrometheusHistogramToDatadogGaugeSeries = (
metricName: string,
quantile: number,
metricData: MetricData,
): v2.MetricSeries[] =>
metricData.result.map(prometheusMetric => ({
// Make it easier for the datadog user to understand what this metric is
metric: DATADOG_METRIC_PREFIX + metricName.split('_bucket')[0] + '_P' + quantile * 100,
// Type 2 is a "guage" metric
// Type 3 is a "gauge" metric
type: 3,
points: prometheusMetric.values.map(([timestamp, value]) => {
return {
Expand Down Expand Up @@ -246,9 +246,9 @@ const main = async () => {
),
)).flat()

const guageSeries = (await Promise.all(histogramMetricNames.map(async metricName =>
const gaugeSeries = (await Promise.all(histogramMetricNames.map(async metricName =>
Promise.all(HISTOGRAM_QUANTILES.map(async quantile =>
convertPrometheusHistogramToDatadogGuageSeries(
convertPrometheusHistogramToDatadogGaugeSeries(
metricName,
quantile,
await queryPrometheusHistogram(metricName, quantile, generateQueryWindow())
Expand All @@ -259,7 +259,7 @@ const main = async () => {
console.log({ level: 'info', message: 'Submitting metrics to Datadog' })
await datadogMetricsApi.submitMetrics({ body: { series: [
...countSeries,
...guageSeries,
...gaugeSeries,
]}})

console.log({ level: 'info', message: 'Pausing for 20s' })
Expand Down
4 changes: 2 additions & 2 deletions cloud/observability/promql-to-dd.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
promql-to-dd.py - Import counters and histograms from prometheus api endpoint into datadog

While this demonstrates how to import prometheus api data using the datadog metrics API,
there is a lot of room for improvement in terms of efficency and error handling.
there is a lot of room for improvement in terms of efficiency and error handling.

To view this data in DataDog Metrics:
* use sum and as_rate for rate metrics
Expand Down Expand Up @@ -105,7 +105,7 @@ def retryable_submit_metrics(datadog_api: MetricsApi, body: MetricPayload):

def submit_datadog_series(datadog_api: MetricsApi, series: Iterable):
print(f"{datetime.now()}: Ingesting {len(series)} series into DataDog")
# submit 200 series at a time as a naieve optimization
# submit 200 series at a time as a naive optimization
# this could be tuned to submit upto 5MB of metrics
# data compressed to a size of upto 512KB
non_empty_responses = []
Expand Down
2 changes: 1 addition & 1 deletion tls/tls-simple/generate-test-certs.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This scripts generates test keys and certificates for the sample.
# In a production environment such artifacts should be genrated
# In a production environment such artifacts should be generated
# by a proper certificate authority and handled in a secure manner.

CERTS_DIR=./certs
Expand Down