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: ECS-EC2 Remove breaking line from otelcol config #172

Merged
merged 2 commits into from
Dec 20, 2024

Conversation

cazorla19
Copy link
Contributor

Description

in the middle of my ECS/EKS onboarding tests, and I've found the bug that's causes the default otel config failing

Error: failed to get config: cannot unmarshal the configuration: 1 error(s) decoding:

* error decoding 'receivers': error reading configuration for "filelog": 1 error(s) decoding:
* error decoding 'operators[1]': unmarshal to json_parser: 1 error(s) decoding:
* '' has invalid keys: default

otelcol claims that the json_parser operator doesn't have the default option/key, and it doesn't start because of it – in fact, it's right, because there is no such option, as I see in docs

router operator has this key, but json_parser doesn't

once I removed this line from the config, things started to work as expected, and all logs/metrics were sent to coralogix

when I've run the problematic config locally with otelcol-contrib, commenting cdot specials, it didn't give me an error because of this key – so I assume that opentelemetry just ignored such things like invalid keys until some version update, when they've made the syntax more strict

we have to remove this line, which causes the error, from both otelcol config on both terraform&cloudformation setups, so we won't get stuck with this issue in the future

How Has This Been Tested?

  1. Created ECS/EC2 cluster from scratch
  2. Deployed the otelcol as terraform module (but otelcol config is the same as in cloudformation tepo)
  3. Found that daemonset tasks don't start, then found the error in the instance console
  4. Removed the line and updated the task definition
  5. Everything went back to normal again

@cazorla19 cazorla19 requested a review from a team as a code owner December 19, 2024 15:19
@CLAassistant
Copy link

CLAassistant commented Dec 19, 2024

CLA assistant check
All committers have signed the CLA.

@cazorla19 cazorla19 assigned daidokoro and unassigned daidokoro Dec 19, 2024
@cazorla19 cazorla19 changed the title ECS-EC2: Remove breaking line from otelcol config fix: ECS-EC2 Remove breaking line from otelcol config Dec 19, 2024
@cazorla19 cazorla19 merged commit 37fe7d8 into master Dec 20, 2024
4 checks passed
@cazorla19 cazorla19 deleted the otelcol_ecs_ec2_fix branch December 27, 2024 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants