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

[pkg/ottl] limit function can't be used #21920

Closed
swiatekm opened this issue May 15, 2023 · 1 comment · Fixed by #21921
Closed

[pkg/ottl] limit function can't be used #21920

swiatekm opened this issue May 15, 2023 · 1 comment · Fixed by #21921
Labels
bug Something isn't working pkg/ottl priority:p1 High

Comments

@swiatekm
Copy link
Contributor

swiatekm commented May 15, 2023

Component(s)

pkg/ottl

What happened?

Description

Collector terminated with an error when trying to use the OTTL limit function in a transform processor config.

Collector version

0.77.0

Environment information

Docker on Linux

Environment

OpenTelemetry Collector configuration

receivers:
  otlp:
    protocols:
      http:

processors:
  transform:
    log_statements:
      - context: resource
        statements:
          - limit(attributes, 1, [])

exporters:
  logging:

service:
  pipelines:
    logs:
      exporters: [logging]
      processors: [transform]
      receivers: [otlp]

Log output

Error: invalid configuration: processors::transform: undefined function limit
2023/05/15 09:50:09 collector server run finished with error: invalid configuration: processors::transform: undefined function limit

Additional context

I think this is because #18822 accidentally set the factory name to uppercase, but functions in OTTL have to be lowercase. See:

return ottl.NewFactory("Limit", &LimitArguments[K]{}, createLimitFunction[K])
.

@swiatekm swiatekm added bug Something isn't working needs triage New item requiring triage labels May 15, 2023
@github-actions
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@swiatekm swiatekm changed the title limit function can't be used [pkg/ottl] limit function can't be used May 15, 2023
@evan-bradley evan-bradley added priority:p1 High and removed needs triage New item requiring triage labels May 15, 2023
@TylerHelmuth TylerHelmuth linked a pull request May 15, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pkg/ottl priority:p1 High
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants