-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
otel: simple OTEL collector/Prometheus stack for testing purposes #5026
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about this change since it introduces more complexity with external shell scripts. I'd prefer to keep everything inside Go.
Could we not use testcontainers for this instead? :)
Slightly wondering if we need the scripts at all, as they (effectively) are just a (I know we have a bunch of a |
IMO a big part of why I want this change is to make local development easier, so Testcontainers don't really achieve that. I'm okay with shell scripts are they're portable and easy to work with and don't require bringing in additional dependencies, but if atm they are really just doing a |
Yes, agreed on the "local development" part. It's usually also my reservation on things like |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, with a suggestion to remove the shell scripts.
I'm not super fond of the scripts either, I was trying to follow a bit of what already existed while keeping things as simple s possible for the community (eg. i think buildx has a script which completely wraps compose, for example, and i thought that was a bit too much). |
628ae1f
to
c91c271
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5026 +/- ##
=======================================
Coverage 61.05% 61.05%
=======================================
Files 295 295
Lines 20647 20647
=======================================
Hits 12605 12605
Misses 7146 7146
Partials 896 896 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
ps i added aspire dashboard here as well so we can test both and see what we want to stick with |
Signed-off-by: Christopher Petito <chrisjpetito@gmail.com>
c91c271
to
e1dcc19
Compare
# Mount the prom.yml config file | ||
- ./prom.yaml:/etc/prometheus/prom.yaml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a blocker for this PR, but I know that bind-mounting files can sometimes be problematic, so looking if we could have a directory to mount (which contains the config-file). Looks like /etc/prometheus
already has some files in the image though, so if we do, we probably should use a different location for the config-file (but good news is that we already define it as a custom location above, so ... could still be an option);
docker run --rm --entrypoint /bin/sh prom/prometheus:latest -c 'ls -l /etc/prometheus'
total 4
lrwxrwxrwx 1 nobody nobody 39 Apr 10 14:30 console_libraries -> /usr/share/prometheus/console_libraries
lrwxrwxrwx 1 nobody nobody 31 Apr 10 14:30 consoles -> /usr/share/prometheus/consoles/
-rw-r--r-- 1 nobody nobody 934 Apr 10 14:21 prometheus.yml
The alternative could be to define it as a config:
in the compose-file (but those are still implemented as bind-mounts in compose, so won't solve the "don't bind individual files" part)
volumes: | ||
# Mount the otelcol.yml config file | ||
- ./otelcol.yaml:/etc/otelcol/config.yaml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same for this one (also not a blocker)
- What I did
Added a compose stack to be used for testing out OTEL functionality, mostly based on our current documentation PR found here.
- How I did it
- How to verify it
Read the doc and try it out :)
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)