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

Config to allow subset of processors and exporters #40

Merged
merged 1 commit into from
Aug 6, 2024

Conversation

oppegard
Copy link
Member

@oppegard oppegard commented Aug 2, 2024

This adds two new job properties that let's an operator restrict the kinds of OTel processors and exporters that can be used:
allow_list.processors and allow_list.exporters. These properties are empty by default ([]), which keeps the existing behavior of allowing all processors and exporters that are included in our distribution. If not empty, then only the included components are allowed. For example, given allow_list.exporters: [otlp] and a config that contain the prometheus exporter, an error will be raised during template rendering of config.yml.erb.

Task 202 | 20:25:55 | Preparing deployment: Rendering templates (00:00:18)
                    L Error: Unable to render instance groups for deployment. Errors are:
  - Unable to render jobs for instance group 'blobstore'. Errors are:
    - Unable to render templates for job 'otel-collector'. Errors are:
      - Error filling in template 'config.yml.erb' (line 130: The following configured exporters are not allowed: ["prometheus"]. Allowed: ["otlp"].)

Given the non-GA status of the majority of OTel components, using these new properties helps limit which of the components can be used by end-users (in our case, only the OTel Collector configuration yaml of config is exposed to end-users, and we can set the new allow list properties).

We also added the memory_limiter processor in our distribution.

@oppegard oppegard requested a review from a team as a code owner August 2, 2024 20:44
Copy link
Member

@ctlong ctlong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM! Just a few questions and concerns.

jobs/otel-collector-windows/templates/config.yml.erb Outdated Show resolved Hide resolved
jobs/otel-collector-windows/spec Outdated Show resolved Hide resolved
jobs/otel-collector-windows/spec Outdated Show resolved Hide resolved
Copy link
Member

@mkocher mkocher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a few minor comments. Let's also rebase the commits and clean up the commit messages before merging this PR

jobs/otel-collector-windows/spec Outdated Show resolved Hide resolved
spec/support/shared_examples_for_otel_collector.rb Outdated Show resolved Hide resolved
This adds two new job properties that let's an operator restrict the
kinds of OTel processors and exporters that can be used:
`allow_list.processors` and `allow_list.exporters`. These properties
are empty by default ([]), which keeps the existing behavior of
allowing all processors and exporters that are included in our
distribution. If not empty, then only the included components are
allowed.

Signed-off-by: Ivan Protsiuk <[email protected]>
Signed-off-by: Matthew Kocher <[email protected]>
Signed-off-by: Glenn Oppegard <[email protected]>
@mkocher mkocher merged commit ca84ae6 into cloudfoundry:main Aug 6, 2024
5 checks passed
@ctlong ctlong deleted the wip-test-validation branch August 6, 2024 21:22
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