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

introduce an otelcol.exporter.kafka component #6752

Closed

Conversation

tpaschalis
Copy link
Member

@tpaschalis tpaschalis commented Mar 22, 2024

PR Description

This component adds the otelcol.exporter.kafka component so that Grafana Agent can work with Kakfa pipelines end-to-end.

Which issue(s) this PR fixes

No issue files

Notes to the Reviewer

PR Checklist

  • CHANGELOG.md updated
  • Documentation added
  • Tests updated
  • Config converters updated

Signed-off-by: Paschalis Tsilias <[email protected]>
Signed-off-by: Paschalis Tsilias <[email protected]>
Signed-off-by: Paschalis Tsilias <[email protected]>
@tpaschalis tpaschalis marked this pull request as ready for review March 22, 2024 15:22
Comment on lines +98 to +99
rr := broker.History()[0]
ch <- fmt.Sprint(rr.Request)
Copy link
Member Author

Choose a reason for hiding this comment

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

I don't particularly like this, but the sarama library's mock doesn't allow for better introspection of the messages as most moving pieces are unexported :/

func init() {
component.Register(component.Registration{
Name: "otelcol.exporter.kafka",
Stability: featuregate.StabilityStable,
Copy link
Member

@rfratto rfratto Mar 22, 2024

Choose a reason for hiding this comment

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

Is this the right stability? This would mean committing to the config schema for at least one year, and declaring knowledge about risk / production readiness. Is this ready for that?

Copy link
Contributor

@clayton-cornell clayton-cornell left a comment

Choose a reason for hiding this comment

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

Some minor doc suggestions

Comment on lines +12 to +14
> **NOTE**: `otelcol.exporter.kafka` is a wrapper over the upstream
> OpenTelemetry Collector `kafka` exporter. Bug reports or feature requests will
> be redirected to the upstream repository, if necessary.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
> **NOTE**: `otelcol.exporter.kafka` is a wrapper over the upstream
> OpenTelemetry Collector `kafka` exporter. Bug reports or feature requests will
> be redirected to the upstream repository, if necessary.
{{< admonition type="note" >}}
`otelcol.exporter.kafka` is a wrapper over the upstream OpenTelemetry Collector `kafka` exporter.
Bug reports or feature requests will be redirected to the upstream repository, if necessary.
{{< /admonition >}}

> be redirected to the upstream repository, if necessary.

This component uses a synchronous producer that blocks and does not batch
messages, therefore it should be used with batch and queued retry processors
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
messages, therefore it should be used with batch and queued retry processors
messages. Therefore, it should be used with batch and queued retry processors


This component uses a synchronous producer that blocks and does not batch
messages, therefore it should be used with batch and queued retry processors
prepended to it, for higher throughput and resiliency.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
prepended to it, for higher throughput and resiliency.
prepended to it for higher throughput and resiliency.

@clayton-cornell clayton-cornell added the type/docs Docs Squad label across all Grafana Labs repos label Mar 23, 2024

Auth kafka.AuthenticationArguments `river:"authentication,block,optional"`
Metadata kafka.MetadataArguments `river:"metadata,block,optional"`
Producer Producer `river:"producer,block,optional"`
Copy link
Contributor

Choose a reason for hiding this comment

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

this block is missing in the documentation


Name | Type | Description | Default | Required
---- | ---- | ----------- | ------- | --------
`protocol_version` | `duration` | Kafka protocol version to use. | | yes
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
`protocol_version` | `duration` | Kafka protocol version to use. | | yes
`protocol_version` | string | Kafka protocol version to use. | | yes

`protocol_version` | `duration` | Kafka protocol version to use. | | yes
`brokers` | list(string) | Kafka brokers to connect to. | `["localhost:9092"]` | no
`client_id` | string | The client ID to configure the Sarama Kafka client with for all produce requests. | `"sarama"` | no
`topic` | string | The name of the Kafka topic to export to. | see below | no
Copy link
Contributor

Choose a reason for hiding this comment

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

To what is this "see below" referring?

`brokers` | list(string) | Kafka brokers to connect to. | `["localhost:9092"]` | no
`client_id` | string | The client ID to configure the Sarama Kafka client with for all produce requests. | `"sarama"` | no
`topic` | string | The name of the Kafka topic to export to. | see below | no
`encoding` | string | The encoding of data sent to Kafka. | see below | no
Copy link
Contributor

Choose a reason for hiding this comment

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

I think that we should still say that otlp_proto is the default

@rfratto rfratto added the variant/flow Relatd to Grafana Agent Flow. label Apr 9, 2024
Copy link
Contributor

This PR has not had any activity in the past 30 days, so the needs-attention label has been added to it.
If you do not have enough time to follow up on this PR or you think it's no longer relevant, consider closing it.
The needs-attention label signals to maintainers that something has fallen through the cracks. No action is needed by you; your PR will be kept open and you do not have to respond to this comment. The label will be removed the next time this job runs if there is new activity.
Thank you for your contributions!

@github-actions github-actions bot added the needs-attention An issue or PR has been sitting around and needs attention. label May 10, 2024
@rfratto
Copy link
Member

rfratto commented Jun 14, 2024

I'm going to close this; the otelcol.exporter.kafka component in Alloy has taken precedence.

@rfratto rfratto closed this Jun 14, 2024
@github-actions github-actions bot added the frozen-due-to-age Locked due to a period of inactivity. Please open new issues or PRs if more discussion is needed. label Jul 15, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
frozen-due-to-age Locked due to a period of inactivity. Please open new issues or PRs if more discussion is needed. needs-attention An issue or PR has been sitting around and needs attention. type/docs Docs Squad label across all Grafana Labs repos variant/flow Relatd to Grafana Agent Flow.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants