Skip to content
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

Fix evaluating env variables in fargate config #935

Merged
merged 2 commits into from
Nov 12, 2021
Merged
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Unreleased

- Add Chocolately package support. (#724)
- Fix evaluating env variables in fargate config (#935)

## v0.38.0

Expand Down
4 changes: 2 additions & 2 deletions cmd/otelcol/config/collector/fargate_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ receivers:
listenAddress: 0.0.0.0:9080
smartagent/ecs-metadata:
type: ecs-metadata
excludedImages: ${env:ECS_METADATA_EXCLUDED_IMAGES}
excludedImages: $${env:ECS_METADATA_EXCLUDED_IMAGES}

processors:
batch:
Expand All @@ -83,7 +83,7 @@ processors:
metrics:
exclude:
match_type: regexp
metric_names: ${env:METRICS_TO_EXCLUDE}
metric_names: $${env:METRICS_TO_EXCLUDE}
# Optional: The following processor can be used to add a default "deployment.environment" attribute to the logs and
# traces when it's not populated by instrumentation libraries.
# If enabled, make sure to enable this processor in the pipeline below.
Expand Down
2 changes: 1 addition & 1 deletion cmd/otelcol/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ func newBaseParserProvider() config.MapProvider {
configYaml := os.Getenv(configYamlEnvVarName)

if configPath == "" && configYaml != "" {
return parserprovider.NewInMemoryMapProvider(bytes.NewBufferString(configYaml))
return parserprovider.NewExpandMapProvider(parserprovider.NewInMemoryMapProvider(bytes.NewBufferString(configYaml)))
}

return parserprovider.NewDefaultMapProvider(configPath, nil)
Expand Down