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

Logs Transform Processor - unknown type: "logstransform" #29150

Closed
Jessimon opened this issue Nov 13, 2023 · 12 comments · Fixed by #29275
Closed

Logs Transform Processor - unknown type: "logstransform" #29150

Jessimon opened this issue Nov 13, 2023 · 12 comments · Fixed by #29275
Labels
enhancement New feature or request processor/logstransform Logs Transform processor

Comments

@Jessimon
Copy link

Component(s)

processor/logstransform

What happened?

Hello Everyone,

I receive logs where the body of the logs are in json format.
I would like to see them as json.

I added the following in my config.
processors: logstransform: operators: - type: json_parser parse_from: body

But when starting i get the following error:
otel-collector_1 | * error decoding 'processors': unknown type: "logstransform" for id: "logstransform" (valid values: [servicegraph span tail_sampling k8sattributes experimental_metricsgeneration metricstransform probabilistic_sampler transform cumulativetodelta filter remoteobserver resourcedetection resource batch memory_limiter attributes datadog routing spanmetrics deltatorate groupbyattrs groupbytrace redaction])

I used the following documentation:
https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/processor/logstransformprocessor/README.md
https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/pkg/stanza/docs/operators/README.md
https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/pkg/stanza/docs/operators/json_parser.md

Is the config wrong?

Thanks for the help.

Collector version

0.88

Environment information

Environment

OTLP is running in a docker on a Debian 11 server.

OpenTelemetry Collector configuration

receivers:
  otlp:
    protocols:
      http:
        endpoint: 0.0.0.0:4319

  awscloudwatch:
    region: *************
    logs:
      poll_interval: 1m

exporters:
  loki:
    endpoint: http://loki-test:3100/loki/api/v1/push
    tls:
      insecure: true

processors:
  logstransform:
    operators:
      - type: json_parser
        parse_from: body

service:
  pipelines:
    logs:
      receivers: [awscloudwatch]
      processors: [logstransform]
      exporters: [loki]

Log output

otel-collector_1  | 2023/11/13 11:18:27 collector server run finished with error: failed to get config: cannot unmarshal the configuration: 1 error(s) decoding:
otel-collector_1  |
otel-collector_1  | * error decoding 'processors': unknown type: "logstransform" for id: "logstransform" (valid values: [servicegraph span tail_sampling k8sattributes experimental_metricsgeneration metricstransform probabilistic_sampler transform cumulativetodelta filter remoteobserver resourcedetection resource batch memory_limiter attributes datadog routing spanmetrics deltatorate groupbyattrs groupbytrace redaction])

Additional context

No response

@Jessimon Jessimon added bug Something isn't working needs triage New item requiring triage labels Nov 13, 2023
@github-actions github-actions bot added the processor/logstransform Logs Transform processor label Nov 13, 2023
Copy link
Contributor

Pinging code owners:

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

@dehaansa
Copy link
Contributor

It looks like you're using a build that doesn't have the processor configured for use. Where are you getting your collector or building your collector?

@Jessimon
Copy link
Author

Heya dehaanse,

It comes from:
otel/opentelemetry-collector-contrib:0.88.0
https://hub.docker.com/r/otel/opentelemetry-collector-contrib

Kind regards

@crobert-1
Copy link
Member

Hi @Jessimon, from the status table in the README it looks like the processor isn't included in the contrib distribution.

@dehaansa and @djaglowski: Do you think it's ready to include in contrib releases, or should it still purposefully be left out?

@crobert-1 crobert-1 added enhancement New feature or request and removed bug Something isn't working needs triage New item requiring triage labels Nov 13, 2023
@dehaansa
Copy link
Contributor

dehaansa commented Nov 13, 2023

I'm not aware of any reasons to not include the processor in the contrib deliverable at this time.

@crobert-1
Copy link
Member

Thanks @dehaansa! In that case, anyone's welcome to submit PRs to get the logstransform processor in a release.

The required steps are found in the adding a new component and releasing new components sections of the contributing documentation. Who ever is able to help complete this, please make sure all steps are complete for the component to be available in a future release.

@djaglowski
Copy link
Member

This processor was developed as a stopgap solution until transform processor could reimplement the same functionality. It will be deprecated in the future and should not be included in the contrib distro.

@Jessimon
Copy link
Author

What is the recommanded way to convert a log body to a json fromat?
The json structure is not fixed.

@djaglowski
Copy link
Member

The transform processor should be able to handle this with the ParseJSON function.

crobert-1 added a commit to crobert-1/opentelemetry-collector-contrib that referenced this issue Nov 14, 2023
Since this processor is experimental and temporary there's no plan
to support it long term. This makes it clear why it's not included
in the contrib distribution releases.

Fixes open-telemetry#29150
@Jessimon
Copy link
Author

Thanks @djaglowski
Would this be used in the processors:?
Do you have an example?
I looked at the documentation and from what i understand ParseJSON can not be used in a transform process.

codeboten pushed a commit that referenced this issue Nov 15, 2023
…leased in contrib (#29275)

An issue was opened recently wondering why this processory was not
available in the contrib release. Since this processor is experimental
and temporary there's no plan to support it long term, so I've added a
note that makes it clear why it's not included in the contrib
distribution releases.

Fixes #29150
@RoryCrispin
Copy link

@djaglowski - is there an issue somewhere tracking which functionality is known to be only possible in the logstransform processor?
For instance, it seems like the transform processor does not yet support stanza/recombine - but perhaps I am mistaken.
Thanks

RoryCrispin pushed a commit to ClickHouse/opentelemetry-collector-contrib that referenced this issue Nov 24, 2023
…leased in contrib (open-telemetry#29275)

An issue was opened recently wondering why this processory was not
available in the contrib release. Since this processor is experimental
and temporary there's no plan to support it long term, so I've added a
note that makes it clear why it's not included in the contrib
distribution releases.

Fixes open-telemetry#29150
@malhomaid
Copy link

It doesn't seem like transform processor supports regex parsing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request processor/logstransform Logs Transform processor
Projects
None yet
6 participants