-
Couldn't load subscription status.
- Fork 123
[FileBasedConfiguration] Resource Documentation #4469
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Kielek
merged 17 commits into
open-telemetry:main
from
ysolomchenko:FileBasedConfiguration-Resource-Documentation
Sep 29, 2025
+65
−0
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
d3d4bb8
docs
ysolomchenko d562d0e
Merge branch 'main' into FileBasedConfiguration-Resource-Documentation
Kielek 81f95c7
Remove reference to file-based configuration from documentation
ysolomchenko 2ea3f70
remove `type` from resource configuration
ysolomchenko 938bdb9
Merge branch 'FileBasedConfiguration-Resource-Documentation' of https…
ysolomchenko ff3f42a
update link to Resource Detectors documentation
ysolomchenko 86c66f3
Add instructions for disabling detectors
ysolomchenko afcd67d
Update docs/file-based-configuration.md
ysolomchenko fd584ea
Update docs/file-based-configuration.md
ysolomchenko e837dd4
Update docs/file-based-configuration.md
ysolomchenko b95b753
Add reference to YAML File Format Specification
ysolomchenko c09f252
Refactor Resource Detectors section in file-based configuration docum…
ysolomchenko fcde65c
Update docs/file-based-configuration.md
ysolomchenko 4989a78
update dosc
ysolomchenko 8386cf3
Merge branch 'FileBasedConfiguration-Resource-Documentation' of https…
ysolomchenko 57d8ecf
Enhance with default service.name and detector behavior
ysolomchenko 5e2ef2d
Merge branch 'main' into FileBasedConfiguration-Resource-Documentation
ysolomchenko File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| # File-based Configuration | ||
|
|
||
| > **Status:** [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) | ||
| > For more information, see: | ||
| > **[Configuration SDK specification](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.49.0/specification/configuration/sdk.md)** | ||
|
|
||
| You can configure OpenTelemetry using a YAML file. | ||
|
|
||
| To enable file-based configuration, set the following environment variable: | ||
|
|
||
| ```bash | ||
| OTEL_EXPERIMENTAL_FILE_BASED_CONFIGURATION_ENABLED=true | ||
| ``` | ||
|
|
||
| By default, the value is false. | ||
|
|
||
| You can also specify the configuration file path (default: `config.yaml`): | ||
|
|
||
| ```bash | ||
| OTEL_EXPERIMENTAL_CONFIG_FILE=/path/to/config.yaml | ||
| ``` | ||
|
|
||
| In your config file you can use environment variables in the format `${ENVIRONMENT_VARIABLE}` | ||
pellared marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| instead of a fixed value. | ||
|
|
||
| You can also use `${ENVIRONMENT_VARIABLE:-value}`, where `value` is the fallback | ||
| if the environment variable is empty or not set. | ||
|
|
||
| For more details, see: [OpenTelemetry YAML File Format Specification](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.49.0/specification/configuration/data-model.md#yaml-file-format). | ||
|
|
||
| ## Configuration Examples | ||
|
|
||
| ### Resource Configuration | ||
pellared marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| You can configure resource attributes directly in YAML or via the | ||
| `OTEL_RESOURCE_ATTRIBUTES` environment variable. | ||
|
|
||
| For more details and updates about Resource Detectors Configuration, see: | ||
| [Resource Detectors list and documentation](config.md/#resource-detectors) | ||
| To disable a resource detector, comment out or remove its corresponding entry. | ||
|
|
||
| ``` yaml | ||
| resource: | ||
| # Configure resource attributes. Entries have higher priority than entries from .resource.attributes_list. | ||
| # Entries must contain .name and .value | ||
| # By default service.name is generated automatically if not explicitly configured. | ||
| # If the application is hosted on IIS in .NET Framework this will be SiteName\VirtualPath (e.g., MySite\MyApp). | ||
| # Otherwise, it will use the name of the application entry Assembly. | ||
| # You can override this value manually below. | ||
| attributes: | ||
| - name: service.name | ||
| value: unknown_service | ||
| # Alternatively, configure via a comma-separated list (same format as OTEL_RESOURCE_ATTRIBUTES). | ||
| attributes_list: ${OTEL_RESOURCE_ATTRIBUTES} | ||
| # Resource Detectors Configuration | ||
| detection/development: | ||
| # If no detectors are specified, none will be added automatically. | ||
| detectors: | ||
| azureappservice: # Detects Azure App Service resource information | ||
Kielek marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| container: # Detects container resource info (container.* attributes) [Core only] | ||
| host: # Detects host resource info (host.* attributes) | ||
| operatingsystem: # Detects OS-level attributes (os.*) | ||
| process: # Detects process-level attributes (process.*) | ||
| processruntime: # Detects process runtime attributes (process.runtime.*) | ||
| ``` | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.