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

component/otelcol/receiver: create receiver component abstraction #2254

Merged
merged 3 commits into from
Oct 3, 2022

Conversation

rfratto
Copy link
Member

@rfratto rfratto commented Sep 30, 2022

This commit introduces a new package, component/otelcol/receiver, which exposes a generic Flow component implementation which can run OpenTelemetry Collector receiver.

Like #2227, it leaves some work unfinished for future PRs:

  • A Zap logging adapter needs to be created to correctly process logs from OpenTelemetry Collector components.
  • Component-specific metrics are currently ignored.
  • Component-specific traces are currently ignored.

As of this commit, there are no registered otelcol.receiver.* components. Implementations for OpenTelemetry Collector Flow components will be done in future PRs.

Related to #2213. A third PR for component/otelcol/processor will be made following this one.

This commit introduces a new package, component/otelcol/receiver, which
exposes a generic Flow component implementation which can run
OpenTelemetry Collector receiver.

Like grafana#2227, it leaves some work unfinished for future PRs:

* A Zap logging adapter needs to be created to correctly process logs
  from OpenTelemetry Collector components.
* Component-specific metrics are currently ignored.
* Component-specific traces are currently ignored.

As of this commit, there are no registered `otelcol.receiver.*`
components. Implementations for OpenTelemetry Collector Flow components
will be done in future PRs.

Related to grafana#2213.
Copy link
Member

@tpaschalis tpaschalis left a comment

Choose a reason for hiding this comment

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

Looks clean!

type ConsumerArguments struct {
Metrics []Consumer `river:"metrics,attr,optional"`
Logs []Consumer `river:"logs,attr,optional"`
Traces []Consumer `river:"traces,attr,optional"`
Copy link
Member

Choose a reason for hiding this comment

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

We'll always use the fanoutconsumer package implementations for these internally, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, fanoutconsumer is only used when passing the list of consumers to the OpenTelemetry code. These will instead almost always be conusmers from the lazyconsumer package (unless one day there's different components which are otelcol-compatible that have their own approach for exposing consumers)

Copy link
Collaborator

@mattdurham mattdurham left a comment

Choose a reason for hiding this comment

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

LGTM

@rfratto rfratto merged commit 51dc11e into grafana:main Oct 3, 2022
@rfratto rfratto deleted the otelcol-receiver branch October 3, 2022 14:13
rfratto added a commit to rfratto/agent that referenced this pull request Oct 3, 2022
This commit introduces a new package, component/otelcol/processor, which
exposes a generic Flow component implementation which can run
OpenTelemetry Collector processor.

Like grafana#2227 and grafana#2254, it leaves some work unfinished for future PRs:

* A Zap logging adapter needs to be created to correctly process logs
  from OpenTelemetry Collector components.
* Component-specific metrics are currently ignored.
* Component-specific traces are currently ignored.

As of this commit, there are no registered `otelcol.processor.*`
components. Implementations for OpenTelemetry Collector Flow components
will be done in future PRs.

Related to grafana#2213.
rfratto added a commit to rfratto/agent that referenced this pull request Oct 3, 2022
This commit introduces a new package, component/otelcol/processor, which
exposes a generic Flow component implementation which can run
OpenTelemetry Collector processor.

Like grafana#2227 and grafana#2254, it leaves some work unfinished for future PRs:

* A Zap logging adapter needs to be created to correctly process logs
  from OpenTelemetry Collector components.
* Component-specific metrics are currently ignored.
* Component-specific traces are currently ignored.

As of this commit, there are no registered `otelcol.processor.*`
components. Implementations for OpenTelemetry Collector Flow components
will be done in future PRs.

Related to grafana#2213.
rfratto added a commit to rfratto/agent that referenced this pull request Oct 4, 2022
This commit introduces a new package, component/otelcol/processor, which
exposes a generic Flow component implementation which can run
OpenTelemetry Collector processor.

Like grafana#2227 and grafana#2254, it leaves some work unfinished for future PRs:

* A Zap logging adapter needs to be created to correctly process logs
  from OpenTelemetry Collector components.
* Component-specific metrics are currently ignored.
* Component-specific traces are currently ignored.

As of this commit, there are no registered `otelcol.processor.*`
components. Implementations for OpenTelemetry Collector Flow components
will be done in future PRs.

Related to grafana#2213.
rfratto added a commit that referenced this pull request Oct 4, 2022
…2284)

This commit introduces a new package, component/otelcol/processor, which
exposes a generic Flow component implementation which can run
OpenTelemetry Collector processor.

Like #2227 and #2254, it leaves some work unfinished for future PRs:

* Component-specific metrics are currently ignored.
* Component-specific traces are currently ignored.

As of this commit, there are no registered `otelcol.processor.*`
components. Implementations for OpenTelemetry Collector Flow components
will be done in future PRs.

Related to #2213.
rfratto added a commit to rfratto/agent that referenced this pull request Oct 12, 2022
OpenTelemetry supports many extensions. Extensions are used as a generic
way to put "everything else" into OpenTelemetry. There are two types of
extensions relevant to us:

* [Authentication extensions][auth-ext]: used for both client and server
  authentication.
* [Storage extensions][storage-ext]: used for external storage of state.

Other extensions, such as [awsproxy][] are useful but better suited as
generic Flow components rather than being shoved in the otelcol
namespace, since they are unrelated to telemetry pipelines and aren't
referenced by other otelcol components in the upstream configuration.

This commit introduces a new package, component/otelcol/auth, which
exposes a generic Flow component implementation which can run
OpenTelemetry Collector extensions meant for authentication.

While storage extensions may end up being Flow components eventually,
it's currently marked as experimental upstream. We will reevaluate
storage extension components once things have stabilized a little more.

Like grafana#2227, grafana#2254, and grafana#2284, it leaves some work unfinished for future
PRs:

* Component-specific metrics are currently ignored.
* Component-specific traces are currently ignored.

As of this commit, there are no registered `otelcol.auth.*` components.
Implementations for OpenTelemetry Collector Flow components will be done
in future PRs.

Related to grafana#2213.

[auth-ext]: https://pkg.go.dev/go.opentelemetry.io/collector@v0.61.0/config/configauth
[storage-ext]: https://pkg.go.dev/go.opentelemetry.io/collector/extension/experimental/storage
[awsproxy]: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.61.0/extension/awsproxy
rfratto added a commit to rfratto/agent that referenced this pull request Oct 12, 2022
OpenTelemetry supports many extensions. Extensions are used as a generic
way to put "everything else" into OpenTelemetry. To quote their
[documentation][ext-docs]:

> Extension is the interface for objects hosted by the OpenTelemetry
> Collector that don't participate directly on data pipelines but provide
> some functionality to the service, examples: health check endpoint,
> z-pages, etc.

There are two types of extensions relevant to us:

* [Authentication extensions][auth-ext]: used for both client and server
  authentication.
* [Storage extensions][storage-ext]: used for external storage of state.

Other extensions, such as [awsproxy][] are useful but better suited as
generic Flow components rather than being shoved in the otelcol
namespace, since they are unrelated to telemetry pipelines and aren't
referenced by other otelcol components in the upstream configuration.

This commit introduces a new package, component/otelcol/auth, which
exposes a generic Flow component implementation which can run
OpenTelemetry Collector extensions meant for authentication.

While storage extensions may end up being Flow components eventually,
it's currently marked as experimental upstream. We will reevaluate
storage extension components once things have stabilized a little more.

Like grafana#2227, grafana#2254, and grafana#2284, it leaves some work unfinished for future
PRs:

* Component-specific metrics are currently ignored.
* Component-specific traces are currently ignored.

As of this commit, there are no registered `otelcol.auth.*` components.
Implementations for OpenTelemetry Collector Flow components will be done
in future PRs.

Related to grafana#2213.

[ext-docs]: https://pkg.go.dev/go.opentelemetry.io/collector@v0.61.0/component#Extension
[auth-ext]: https://pkg.go.dev/go.opentelemetry.io/collector@v0.61.0/config/configauth
[storage-ext]: https://pkg.go.dev/go.opentelemetry.io/collector/extension/experimental/storage
[awsproxy]: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.61.0/extension/awsproxy
rfratto added a commit to rfratto/agent that referenced this pull request Oct 12, 2022
OpenTelemetry supports many extensions. Extensions are used as a generic
way to put "everything else" into OpenTelemetry. To quote their
[documentation][ext-docs]:

> Extension is the interface for objects hosted by the OpenTelemetry
> Collector that don't participate directly on data pipelines but provide
> some functionality to the service, examples: health check endpoint,
> z-pages, etc.

There are two types of extensions relevant to us:

* [Authentication extensions][auth-ext]: used for both client and server
  authentication.
* [Storage extensions][storage-ext]: used for external storage of state.

Other extensions, such as [awsproxy][] are useful but better suited as
generic Flow components rather than being shoved in the otelcol
namespace, since they are unrelated to telemetry pipelines and aren't
referenced by other otelcol components in the upstream configuration.

This commit introduces a new package, component/otelcol/auth, which
exposes a generic Flow component implementation which can run
OpenTelemetry Collector extensions meant for authentication.

While storage extensions may end up being Flow components eventually,
it's currently marked as experimental upstream. We will reevaluate
storage extension components once things have stabilized a little more.

Like grafana#2227, grafana#2254, and grafana#2284, it leaves some work unfinished for future
PRs:

* Component-specific metrics are currently ignored.
* Component-specific traces are currently ignored.

As of this commit, there are no registered `otelcol.auth.*` components.
Implementations for OpenTelemetry Collector Flow components will be done
in future PRs.

Related to grafana#2213.

[ext-docs]: https://pkg.go.dev/go.opentelemetry.io/collector@v0.61.0/component#Extension
[auth-ext]: https://pkg.go.dev/go.opentelemetry.io/collector@v0.61.0/config/configauth
[storage-ext]: https://pkg.go.dev/go.opentelemetry.io/collector/extension/experimental/storage
[awsproxy]: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.61.0/extension/awsproxy
rfratto added a commit that referenced this pull request Oct 12, 2022
…2352)

OpenTelemetry supports many extensions. Extensions are used as a generic
way to put "everything else" into OpenTelemetry. To quote their
[documentation][ext-docs]:

> Extension is the interface for objects hosted by the OpenTelemetry
> Collector that don't participate directly on data pipelines but provide
> some functionality to the service, examples: health check endpoint,
> z-pages, etc.

There are two types of extensions relevant to us:

* [Authentication extensions][auth-ext]: used for both client and server
  authentication.
* [Storage extensions][storage-ext]: used for external storage of state.

Other extensions, such as [awsproxy][] are useful but better suited as
generic Flow components rather than being shoved in the otelcol
namespace, since they are unrelated to telemetry pipelines and aren't
referenced by other otelcol components in the upstream configuration.

This commit introduces a new package, component/otelcol/auth, which
exposes a generic Flow component implementation which can run
OpenTelemetry Collector extensions meant for authentication.

While storage extensions may end up being Flow components eventually,
it's currently marked as experimental upstream. We will reevaluate
storage extension components once things have stabilized a little more.

Like #2227, #2254, and #2284, it leaves some work unfinished for future
PRs:

* Component-specific metrics are currently ignored.
* Component-specific traces are currently ignored.

As of this commit, there are no registered `otelcol.auth.*` components.
Implementations for OpenTelemetry Collector Flow components will be done
in future PRs.

Related to #2213.

[ext-docs]: https://pkg.go.dev/go.opentelemetry.io/collector@v0.61.0/component#Extension
[auth-ext]: https://pkg.go.dev/go.opentelemetry.io/collector@v0.61.0/config/configauth
[storage-ext]: https://pkg.go.dev/go.opentelemetry.io/collector@v0.61.0/extension/experimental/storage
[awsproxy]: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.61.0/extension/awsproxy
@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 Mar 17, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 17, 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants