Commit Graph

14 Commits

Author SHA1 Message Date
Matthieu MOREL 0204d957e5
[chore]: enable whitespace linter (#11579)
#### Description

[whitespace](https://golangci-lint.run/usage/linters/#whitespace) is a
linter that checks for unnecessary newlines at the start and end of
functions.

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2024-10-31 12:15:54 -07:00
Bogdan Drutu 9701538c89
Deprecate funcs that repeate extension in name (#11413)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2024-10-10 16:10:02 -07:00
Bogdan Drutu 738b9dfe66
Deprecate funcs that repeate exporter in name (#11370)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2024-10-08 19:38:32 -07:00
Bogdan Drutu 98230db9d3
Deprecate funcs that repeate processor in name (#11310)
Similar with
https://github.com/open-telemetry/opentelemetry-collector/pull/11287

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2024-09-30 15:31:44 -07:00
Bogdan Drutu bce1040a63
Deprecate funcs that repeate receiver in name (#11287)
This change makes the names to be more "Go" friendly. Also it will not
become an issue that types will try to implement different Factory types
(receiver,processor) because that is forbidden because of our design.
This also makes the names consistent with connector.Factory.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2024-09-30 09:19:33 -07:00
Daniel Jaglowski f2c56a3752
Enhance builder to capture go module for each component type (#10599)
Resolves #10570

Alternative to #10598

This implementation is more reliable that #10598 because it gets
information directly from the builder manifest. It relies on additional
structure in the `component.go` file, ultimately encoded in
`otelcol.Factories`.

An alternative would be to push the enhancements deeper, into the
`<kind>.Factories` implementations, so that the module information is
available directly alongside the Factory.
2024-07-16 17:21:42 +02:00
Shaunak Kashyap de3ef01bff
[service] Validate pipeline type against component types (#9257)
**Description:** <Describe what has changed.>
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->

This change adds another layer of validation to pipelines. It validates
that all the components in a pipeline are of the same type as the
pipeline.

For example, if a `metrics` pipeline contains a `traces`-only receiver,
the `otelcol validate -config ...` command will fail.

**Link to tracking Issue:** 
Fixes #8007.

**Testing:** 
Added unit test + existing tests are passing.

**Documentation:**
godoc.

---------

Co-authored-by: Pablo Baeyens <pablo.baeyens@datadoghq.com>
2024-04-10 12:35:20 +02:00
Alex Boten 4688461318
[chore] fix unused params (#9578)
Related to #9577

Signed-off-by: Alex Boten <aboten@lightstep.com>
2024-02-13 11:04:48 -08:00
Ben B ecd837e596
Fix featuregate late initialization (#8478)
The factories for the components are created before the CLI flags are
evaluated. Therefore, featuregate flags are ignored during the early
startup phase.
~This PR simply shifts the time of creation of the factory map after the
CLI flag evaluation.~

Closes https://github.com/open-telemetry/opentelemetry-collector/issues/4967

**Testing:**
Short manual testing via cli. Adding the following line in
`cobra.Command.RunE`.
```golang
featuregate.GlobalRegistry().VisitAll(func(fg *featuregate.Gate) { fmt.Println(fg.ID(), fg.IsEnabled()) })
```
Changing `+` & `-`:
```bash
./bin/otelcorecol_linux_amd64 --config=config.yaml --feature-gates=+telemetry.disableHighCardinalityMetrics
```

---------

Signed-off-by: Benedikt Bongartz <bongartz@klimlive.de>
Signed-off-by: Alex Boten <aboten@lightstep.com>
Co-authored-by: Alex Boten <aboten@lightstep.com>
2023-11-03 12:52:30 -07:00
Juraci Paixão Kröhling d29c591290
Add stability levels to components output (#8289)
Fixes
https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/9518

Example output:

```
buildinfo:
    command: otelcorecol
    description: Local OpenTelemetry Collector binary, testing only.
    version: 0.83.0-dev
receivers:
    - name: otlp
      stability:
        logs: Beta
        metrics: Stable
        traces: Stable
processors:
    - name: memory_limiter
      stability:
        logs: Beta
        metrics: Beta
        traces: Beta
    - name: batch
      stability:
        logs: Stable
        metrics: Stable
        traces: Stable
exporters:
    - name: logging
      stability:
        logs: Development
        metrics: Development
        traces: Development
    - name: otlp
      stability:
        logs: Beta
        metrics: Stable
        traces: Stable
    - name: otlphttp
      stability:
        logs: Beta
        metrics: Stable
        traces: Stable
connectors:
    - name: forward
      stability:
        logs-to-logs: Beta
        logs-to-metrics: Undefined
        logs-to-traces: Undefined
        metrics-to-logs: Undefined
        metrics-to-metrics: Beta
        metrics-to-traces: Undefined
        traces-to-logs: Undefined
        traces-to-metrics: Undefined
        traces-to-traces: Beta
extensions:
    - name: memory_ballast
      stability:
        extension: Beta
    - name: zpages
      stability:
        extension: Beta
```

Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>

---------

Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>
2023-08-31 09:10:14 -07:00
Alex Boten b0d424ab85
[chore] command name didn't reflect the subcmd (#7834)
minor refactor to the components sub command.

---------

Signed-off-by: Alex Boten <aboten@lightstep.com>
2023-06-07 14:45:09 -07:00
Evan Bradley 604c33d158
Add connectors to the components command (#7809)
Add connector components to the output of the components command.

Co-authored-by: Evan Bradley <evan-bradley@users.noreply.github.com>
2023-06-01 14:56:41 -07:00
Alex Boten 80d704deb4
[chore] use license shortform (#7694)
* [chore] use license shortform

To remain consistent w/ contrib repo, see https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/22052

Signed-off-by: Alex Boten <aboten@lightstep.com>

* make goporto

Signed-off-by: Alex Boten <aboten@lightstep.com>

---------

Signed-off-by: Alex Boten <aboten@lightstep.com>
2023-05-18 13:11:17 -07:00
Bogdan Drutu ad2dc45ea9
Remove deprecated funcs service.NewCommand and service.NewSvcHandler. (#6722)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2022-12-09 14:54:28 -08:00