Skip to content

Commit 73cd03f

Browse files
committed
Fix typos, add links to examples from readme
1 parent 54b734b commit 73cd03f

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

README.md

+9
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@ This repository contains the JSON schema that defines the OpenTelemetry configur
88
- code generation
99
- broad support across languages
1010

11+
## Starter templates
12+
13+
The [examples](./examples) repository contains a variety of sample configuration files to help get started and illustrate useful patterns. The following are noteworthy:
14+
15+
- [sdk-migration-config.yaml](./examples/sdk-migration-config.yaml): Includes env var substitution references to all [standard environment variables](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md) which map cleanly to file configuration (see notes in the example for the set of env vars which are not referenced). Note, SDKs parsing configuration files ignore all env vars besides those referenced via [env var substitution][]. This is a great starting point for transitioning from env var based configuration to file based configuration.
16+
- [sdk-config.yaml](./examples/sdk-config.yaml): Represents the typical default configuration. This is a good starting point if you are not using env var based configuration or wish to transition fully to file baed configuration. Note, SDKs parsing configuration files ignore all env vars besides those referenced via [env var substitution][].
17+
18+
[env var substitution]: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/file-configuration.md#environment-variable-substitution
19+
1120
## Code generation
1221

1322
There are [several tools](https://json-schema.org/implementations.html) available to generate code from a JSON schema. The following shows an example for generating code from the JSON schema in Go:

examples/sdk-migration-config.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ tracer_provider:
8383
# Configure protocol.
8484
protocol: ${OTEL_EXPORTER_OTLP_PROTOCOL:-http/protobuf}
8585
# Configure endpoint.
86-
endpoint: ${OTEL_EXPORTER_OTLP_PROTOCOL:-http://localhost:-4318}
86+
endpoint: ${OTEL_EXPORTER_OTLP_ENDPOINT:-http://localhost:4318}
8787
# Configure certificate.
8888
certificate: ${OTEL_EXPORTER_OTLP_CERTIFICATE}
8989
# Configure mTLS private client key.
@@ -150,7 +150,7 @@ meter_provider:
150150
# Configure protocol.
151151
protocol: ${OTEL_EXPORTER_OTLP_PROTOCOL:-http/protobuf}
152152
# Configure endpoint.
153-
endpoint: ${OTEL_EXPORTER_OTLP_PROTOCOL:-http://localhost:-4318}
153+
endpoint: ${OTEL_EXPORTER_OTLP_ENDPOINT:-http://localhost:4318}
154154
# Configure certificate.
155155
certificate: ${OTEL_EXPORTER_OTLP_CERTIFICATE}
156156
# Configure mTLS private client key.
@@ -187,7 +187,7 @@ logger_provider:
187187
# Configure protocol.
188188
protocol: ${OTEL_EXPORTER_OTLP_PROTOCOL:-http/protobuf}
189189
# Configure endpoint.
190-
endpoint: ${OTEL_EXPORTER_OTLP_PROTOCOL:-http://localhost:4318}
190+
endpoint: ${OTEL_EXPORTER_OTLP_ENDPOINT:-http://localhost:4318/v1/logs}
191191
# Configure certificate.
192192
certificate: ${OTEL_EXPORTER_OTLP_CERTIFICATE}
193193
# Configure mTLS private client key.

0 commit comments

Comments
 (0)