Skip to content

Commit fdf466c

Browse files
committed
Merge remote-tracking branch 'origin/main' into otelbot/spec-integration-v1.51.0-dev
2 parents 2912901 + 316f7d2 commit fdf466c

File tree

6 files changed

+87
-67
lines changed

6 files changed

+87
-67
lines changed

content/en/docs/contributing/pr-checks.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,15 +82,15 @@ This check will verify that all words in your cSpell ignore list are normalized.
8282
If this check fails, run `npm run fix:dict` locally and push the changes in a
8383
new commit.
8484

85-
### `FILENAME check` {.notranslate lang=en}
85+
### `FILE FORMAT` {.notranslate lang=en}
8686

87-
This check verifies that all
88-
[files are formatted by prettier](../style-guide/#file-format).
87+
This check verifies that all files conform to
88+
[Prettier format rules](../style-guide/#file-format).
8989

9090
If this check fails, run `npm run fix:format` locally and push the changes in a
9191
new commit.
9292

93-
### `FILE FORMAT` {.notranslate lang=en}
93+
### `FILENAME check` {.notranslate lang=en}
9494

9595
This check verifies that all
9696
[file names are in kebab-case](../style-guide/#file-names).

content/en/docs/contributing/style-guide.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,13 @@ title: registryEntryTitle
8888
8989
## File format
9090
91-
We enforce file formatting using [Prettier]. Invoke it using
92-
`npm run fix:format`.
91+
We use [Prettier] to enforce file formatting. Invoke it using:
92+
93+
- `npm run fix:format` to format all files
94+
- `npm run fix:format:diff` to format only the files that have changed since the
95+
last commit
96+
- `npm run fix:format:staged` to format only the files that are staged for the
97+
next commit
9398

9499
## File names
95100

content/en/docs/languages/sdk-configuration/general.md

Lines changed: 60 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ cSpell:ignore: ottrace
99
{{% alert title="Note" %}}
1010

1111
Support for environment variables is optional. For detailed information on which
12-
environment variables each language implementation supports, please consult the
12+
environment variables each language implementation supports, see the
1313
[Implementation Compliance Matrix](https://github.com/open-telemetry/opentelemetry-specification/blob/main/spec-compliance-matrix.md#environment-variables).
1414

1515
{{% /alert %}}
@@ -19,63 +19,70 @@ environment variables each language implementation supports, please consult the
1919
Sets the value of the [`service.name`](/docs/specs/semconv/resource/#service)
2020
resource attribute.
2121

22-
**Default value:** `"unknown_service"`
22+
**Default value:** `unknown_service`
2323

2424
If `service.name` is also provided in `OTEL_RESOURCE_ATTRIBUTES`, then
2525
`OTEL_SERVICE_NAME` takes precedence.
2626

2727
**Example:**
2828

29-
`export OTEL_SERVICE_NAME="your-service-name"`
29+
```sh
30+
export OTEL_SERVICE_NAME="your-service-name"
31+
```
3032

3133
## `OTEL_RESOURCE_ATTRIBUTES`
3234

33-
Key-value pairs to be used as resource attributes. See
34-
[Resource SDK](/docs/specs/otel/resource/sdk#specifying-resource-information-via-an-environment-variable)
35-
for more details.
36-
37-
**Default value:** Empty.
35+
Key-value pairs to be used as resource attributes.
3836

39-
See
40-
[Resource semantic conventions](/docs/specs/semconv/resource/#semantic-attributes-with-sdk-provided-default-value)
41-
for semantic conventions to follow for common resource types.
37+
**Default value:** empty
4238

4339
**Example:**
4440

45-
`export OTEL_RESOURCE_ATTRIBUTES="key1=value1,key2=value2"`
41+
```sh
42+
export OTEL_RESOURCE_ATTRIBUTES="key1=value1,key2=value2"
43+
```
44+
45+
**References:**
46+
47+
- [Resource SDK](/docs/specs/otel/resource/sdk#specifying-resource-information-via-an-environment-variable)
48+
- [Resource semantic conventions](/docs/specs/semconv/resource/#semantic-attributes-with-sdk-provided-default-value)
49+
for common resource type semantic conventions
4650

4751
## `OTEL_TRACES_SAMPLER`
4852

4953
Specifies the Sampler used to sample traces by the SDK.
5054

51-
**Default value:** `"parentbased_always_on"`
55+
**Default value:** `parentbased_always_on`
5256

5357
**Example:**
5458

55-
`export OTEL_TRACES_SAMPLER="traceidratio"`
59+
```sh
60+
export OTEL_TRACES_SAMPLER="traceidratio"
61+
```
5662

5763
Accepted values for `OTEL_TRACES_SAMPLER` are:
5864

59-
- `"always_on"`: `AlwaysOnSampler`
60-
- `"always_off"`: `AlwaysOffSampler`
61-
- `"traceidratio"`: `TraceIdRatioBased`
62-
- `"parentbased_always_on"`: `ParentBased(root=AlwaysOnSampler)`
63-
- `"parentbased_always_off"`: `ParentBased(root=AlwaysOffSampler)`
64-
- `"parentbased_traceidratio"`: `ParentBased(root=TraceIdRatioBased)`
65-
- `"parentbased_jaeger_remote"`: `ParentBased(root=JaegerRemoteSampler)`
66-
- `"jaeger_remote"`: `JaegerRemoteSampler`
67-
- `"xray"`:
68-
[AWS X-Ray Centralized Sampling](https://docs.aws.amazon.com/xray/latest/devguide/xray-console-sampling.html)
69-
(_third party_)
65+
- `always_on`: `AlwaysOnSampler`
66+
- `always_off`: `AlwaysOffSampler`
67+
- `traceidratio`: `TraceIdRatioBased`
68+
- `parentbased_always_on`: `ParentBased(root=AlwaysOnSampler)`
69+
- `parentbased_always_off`: `ParentBased(root=AlwaysOffSampler)`
70+
- `parentbased_traceidratio`: `ParentBased(root=TraceIdRatioBased)`
71+
- `parentbased_jaeger_remote`: `ParentBased(root=JaegerRemoteSampler)`
72+
- `jaeger_remote`: `JaegerRemoteSampler`
73+
- `xray`: [AWS X-Ray Centralized Sampling][] (_third party_)
74+
75+
[AWS X-Ray Centralized Sampling]:
76+
https://docs.aws.amazon.com/xray/latest/devguide/xray-console-sampling.html
7077

7178
## `OTEL_TRACES_SAMPLER_ARG`
7279

73-
Specifies arguments, if applicable, to the sampler defined in by
80+
Specifies arguments, if applicable, to the sampler defined by
7481
`OTEL_TRACES_SAMPLER`. The specified value will only be used if
7582
`OTEL_TRACES_SAMPLER` is set. Each Sampler type defines its own expected input,
7683
if any. Invalid or unrecognized input is logged as an error.
7784

78-
**Default value:** Empty.
85+
**Default value:** empty
7986

8087
**Example:**
8188

@@ -93,7 +100,7 @@ be set as follows:
93100
- For `jaeger_remote` and `parentbased_jaeger_remote`: The value is a comma
94101
separated list:
95102
- Example:
96-
`"endpoint=http://localhost:14250,pollingIntervalMs=5000,initialSamplingRate=0.25"`
103+
`endpoint=http://localhost:14250,pollingIntervalMs=5000,initialSamplingRate=0.25`
97104
- `endpoint`: the endpoint in form of `scheme://host:port` of gRPC server that
98105
serves the sampling strategy for the service
99106
([sampling.proto](https://github.com/jaegertracing/jaeger-idl/blob/main/proto/api_v2/sampling.proto)).
@@ -109,82 +116,80 @@ be set as follows:
109116

110117
Specifies Propagators to be used in a comma-separated list.
111118

112-
**Default value:** `"tracecontext,baggage"`
119+
**Default value:** `tracecontext,baggage`
113120

114121
**Example:**
115122

116123
`export OTEL_PROPAGATORS="b3"`
117124

118125
Accepted values for `OTEL_PROPAGATORS` are:
119126

120-
- `"tracecontext"`: [W3C Trace Context](https://www.w3.org/TR/trace-context/)
121-
- `"baggage"`: [W3C Baggage](https://www.w3.org/TR/baggage/)
122-
- `"b3"`: [B3 Single](/docs/specs/otel/context/api-propagators#configuration)
123-
- `"b3multi"`:
124-
[B3 Multi](/docs/specs/otel/context/api-propagators#configuration)
125-
- `"jaeger"`:
127+
- `tracecontext`: [W3C Trace Context](https://www.w3.org/TR/trace-context/)
128+
- `baggage`: [W3C Baggage](https://www.w3.org/TR/baggage/)
129+
- `b3`: [B3 Single](/docs/specs/otel/context/api-propagators#configuration)
130+
- `b3multi`: [B3 Multi](/docs/specs/otel/context/api-propagators#configuration)
131+
- `jaeger`:
126132
[Jaeger](https://www.jaegertracing.io/docs/1.21/client-libraries/#propagation-format)
127-
- `"xray"`:
133+
- `xray`:
128134
[AWS X-Ray](https://docs.aws.amazon.com/xray/latest/devguide/xray-concepts.html#xray-concepts-tracingheader)
129135
(_third party_)
130-
- `"ottrace"`:
131-
[OT Trace](https://github.com/opentracing?q=basic&type=&language=) (_third
132-
party_)
133-
- `"none"`: No automatically configured propagator.
136+
- `ottrace`: [OT Trace](https://github.com/opentracing?q=basic&type=&language=)
137+
(_third party_)
138+
- `none`: No automatically configured propagator.
134139

135140
## `OTEL_TRACES_EXPORTER`
136141

137142
Specifies which exporter is used for traces. Depending on the implementation it
138143
may be a comma-separated list.
139144

140-
**Default value:** `"otlp"`
145+
**Default value:** `otlp`
141146

142147
**Example:**
143148

144149
`export OTEL_TRACES_EXPORTER="jaeger"`
145150

146151
Accepted values for are:
147152

148-
- `"otlp"`: [OTLP][]
149-
- `"jaeger"`: export in Jaeger data model
150-
- `"zipkin"`: [Zipkin](https://zipkin.io/zipkin-api/)
151-
- `"console"`: [Standard Output](/docs/specs/otel/trace/sdk_exporters/stdout/)
152-
- `"none"`: No automatically configured exporter for traces.
153+
- `otlp`: [OTLP][]
154+
- `jaeger`: Export in Jaeger data model.
155+
- `zipkin`: [Zipkin](https://zipkin.io/zipkin-api/)
156+
- `console`: [Standard Output](/docs/specs/otel/trace/sdk_exporters/stdout/)
157+
- `none`: No automatically configured exporter for traces.
153158

154159
## `OTEL_METRICS_EXPORTER`
155160

156161
Specifies which exporter is used for metrics. Depending on the implementation it
157162
may be a comma-separated list.
158163

159-
**Default value:** `"otlp"`
164+
**Default value:** `otlp`
160165

161166
**Example:**
162167

163168
`export OTEL_METRICS_EXPORTER="prometheus"`
164169

165170
Accepted values for `OTEL_METRICS_EXPORTER` are:
166171

167-
- `"otlp"`: [OTLP][]
168-
- `"prometheus"`:
172+
- `otlp`: [OTLP]
173+
- `prometheus`:
169174
[Prometheus](https://github.com/prometheus/docs/blob/main/docs/instrumenting/exposition_formats.md)
170-
- `"console"`: [Standard Output](/docs/specs/otel/metrics/sdk_exporters/stdout/)
171-
- `"none"`: No automatically configured exporter for metrics.
175+
- `console`: [Standard Output](/docs/specs/otel/metrics/sdk_exporters/stdout/)
176+
- `none`: No automatically configured exporter for metrics.
172177

173178
## `OTEL_LOGS_EXPORTER`
174179

175180
Specifies which exporter is used for logs. Depending on the implementation it
176181
may be a comma-separated list.
177182

178-
**Default value:** `"otlp"`
183+
**Default value:** `otlp`
179184

180185
**Example:**
181186

182187
`export OTEL_LOGS_EXPORTER="otlp"`
183188

184189
Accepted values for `OTEL_LOGS_EXPORTER` are:
185190

186-
- `"otlp"`: [OTLP][]
187-
- `"console"`: [Standard Output](/docs/specs/otel/logs/sdk_exporters/stdout/)
188-
- `"none"`: No automatically configured exporter for logs.
191+
- `otlp`: [OTLP]
192+
- `console`: [Standard Output](/docs/specs/otel/logs/sdk_exporters/stdout/)
193+
- `none`: No automatically configured exporter for logs.
189194

190195
[otlp]: /docs/specs/otlp/

data/community/members.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ governance-committee:
55
- name: austinlparker
66
html_url: https://github.com/austinlparker
77
avatar_url: https://avatars.githubusercontent.com/u/4140740?v=4
8-
- name: danielgblanco
9-
html_url: https://github.com/danielgblanco
10-
avatar_url: https://avatars.githubusercontent.com/u/4158734?v=4
118
- name: jpkrohling
129
html_url: https://github.com/jpkrohling
1310
avatar_url: https://avatars.githubusercontent.com/u/13387?v=4
11+
- name: maryliag
12+
html_url: https://github.com/maryliag
13+
avatar_url: https://avatars.githubusercontent.com/u/1017486?v=4
1414
- name: mtwo
1515
html_url: https://github.com/mtwo
1616
avatar_url: https://avatars.githubusercontent.com/u/1144235?v=4

package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"__check:links": "make --keep-going check-links",
88
"__check:format:nowrap": "npm run _check:format:any -- --prose-wrap preserve",
99
"_build": "npm run _hugo -- -e dev --buildDrafts --buildFuture --baseURL \"${DEPLOY_PRIME_URL:-http://localhost}\"",
10-
"__check:format": "./scripts/npx-helper.sh prettier",
10+
"__check:format": "./scripts/npx-helper.sh prettier --ignore-unknown",
1111
"_check:format:any": "npm run __check:format -- --check --ignore-path ''",
1212
"_check:format:nowrap": "npm run __check:format:nowrap -- content/ja content/uk content/zh",
1313
"_check:format": "npm run __check:format -- --check .",
@@ -24,7 +24,7 @@
2424
"_fail": "exit 1",
2525
"_filename-error": "echo 'ERROR: the following files violate naming conventions; fix using: `npm run fix:filenames`'; echo; npm run -s _ls-bad-filenames; exit 1",
2626
"_fix:trailing-spaces": "find content -name '*.md' -exec perl -i -pe 's/[ \t]+$//g' {} +",
27-
"_fix:format:diff": "npm run __check:format -- --write $(npm -s run _list:diff)",
27+
"_fix:format:diff": "npm run __check:format -- --write",
2828
"_get:no": "echo SKIPPING get operation",
2929
"_get:submodule": "set -x && git submodule update --init ${DEPTH:- --depth 999}",
3030
"_hugo": "hugo --cleanDestinationDir",
@@ -33,7 +33,8 @@
3333
"_list:check:*": "npm run --loglevel=warn | grep -Ee '^\\s*check:[^:]+$'",
3434
"_list:check:for-test-and-fix": "npm -s run _list:check:* | grep -Ev \"i18n|${CMD_SKIP:-noop}\"",
3535
"_list:dict": "grep '^\\s*\"@cspell' package.json | awk -F: '{print $1}' | tr -d '\"'",
36-
"_list:diff": "git diff --name-only --diff-filter=AM",
36+
"_list:diff-never-empty": "echo README.md && npm run _list:diff",
37+
"_list:diff": "git diff --name-only --diff-filter=AMR",
3738
"_list:fix:*": "npm run --loglevel=warn | grep -Ee '^\\s*fix:[^:]+$' | grep -v 'fix:all'",
3839
"_list:fix:for-test-and-fix": "npm -s run _list:fix:* | grep -Ev \"i18n|refcache|submodule|${CMD_SKIP:-noop}\"",
3940
"_ls-bad-filenames": "find assets content static -name '*_*' ! -name '[_.]*'",
@@ -72,6 +73,8 @@
7273
"fix:dict": "find content layouts -name \"*.md\" -print0 | xargs -0 scripts/normalize-cspell-front-matter.pl",
7374
"fix:expired": "npm run -s check:expired -- -q | xargs -r -I {} sh -c 'echo \"Deleting expired file: {}\" && rm {}'",
7475
"fix:filenames": "npm run _rename-to-kebab-case",
76+
"fix:format:diff": "npm run _fix:format:diff -- $(npm -s run _list:diff-never-empty)",
77+
"fix:format:staged": "npm run _fix:format:diff -- $(npm -s run _list:diff-never-empty -- --cached)",
7578
"fix:format": "npm run format; npm run _fix:trailing-spaces",
7679
"fix:htmltest-config": "scripts/htmltest-config.sh",
7780
"fix:i18n:status": "scripts/check-i18n.sh -D",

scripts/git/pre-commit.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
#
3+
# Pre-commit hook that runs formatting on staged files
4+
#
5+
6+
exec npm run fix:format:staged
7+

0 commit comments

Comments
 (0)