Skip to content

Commit

Permalink
Fix typos, add links to examples from readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jack-berg committed Apr 26, 2024
1 parent 54b734b commit 73cd03f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ This repository contains the JSON schema that defines the OpenTelemetry configur
- code generation
- broad support across languages

## Starter templates

The [examples](./examples) repository contains a variety of sample configuration files to help get started and illustrate useful patterns. The following are noteworthy:

- [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.
- [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][].

[env var substitution]: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/file-configuration.md#environment-variable-substitution

## Code generation

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:
Expand Down
6 changes: 3 additions & 3 deletions examples/sdk-migration-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ tracer_provider:
# Configure protocol.
protocol: ${OTEL_EXPORTER_OTLP_PROTOCOL:-http/protobuf}
# Configure endpoint.
endpoint: ${OTEL_EXPORTER_OTLP_PROTOCOL:-http://localhost:-4318}
endpoint: ${OTEL_EXPORTER_OTLP_ENDPOINT:-http://localhost:4318}
# Configure certificate.
certificate: ${OTEL_EXPORTER_OTLP_CERTIFICATE}
# Configure mTLS private client key.
Expand Down Expand Up @@ -150,7 +150,7 @@ meter_provider:
# Configure protocol.
protocol: ${OTEL_EXPORTER_OTLP_PROTOCOL:-http/protobuf}
# Configure endpoint.
endpoint: ${OTEL_EXPORTER_OTLP_PROTOCOL:-http://localhost:-4318}
endpoint: ${OTEL_EXPORTER_OTLP_ENDPOINT:-http://localhost:4318}
# Configure certificate.
certificate: ${OTEL_EXPORTER_OTLP_CERTIFICATE}
# Configure mTLS private client key.
Expand Down Expand Up @@ -187,7 +187,7 @@ logger_provider:
# Configure protocol.
protocol: ${OTEL_EXPORTER_OTLP_PROTOCOL:-http/protobuf}
# Configure endpoint.
endpoint: ${OTEL_EXPORTER_OTLP_PROTOCOL:-http://localhost:4318}
endpoint: ${OTEL_EXPORTER_OTLP_ENDPOINT:-http://localhost:4318/v1/logs}
# Configure certificate.
certificate: ${OTEL_EXPORTER_OTLP_CERTIFICATE}
# Configure mTLS private client key.
Expand Down

0 comments on commit 73cd03f

Please sign in to comment.