Skip to content

Commit

Permalink
[exporter/sumologic] use generated status header
Browse files Browse the repository at this point in the history
This PR updates the component to generate the status table using mdatagen. Questions to the code owners:

Does this component require any of the standard warnings? See list: https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/standard-warnings.md

See related issue: open-telemetry#19172

Signed-off-by: Alex Boten <aboten@lightstep.com>
  • Loading branch information
Alex Boten committed Apr 5, 2023
1 parent 52a9d72 commit fba62fa
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 12 deletions.
18 changes: 10 additions & 8 deletions exporter/sumologicexporter/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
# Sumo Logic Exporter

| Status | |
| ------------------------ |---------------|
| Stability | [beta] |
| Supported pipeline types | logs, metrics |
| Distributions | [contrib] |
<!-- status autogenerated section -->
| Status | |
| ------------------------ |-----------|
| Stability | [beta] |
| Supported pipeline types | logs, metrics |
| Distributions | [contrib] |

[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta
[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib
<!-- end autogenerated section -->

This exporter supports sending logs and metrics data to [Sumo Logic](https://www.sumologic.com/).
Traces are exported using native otlphttp exporter as described
Expand Down Expand Up @@ -67,6 +72,3 @@ exporters:
metadata_attributes:
- k8s.*
```

[beta]:https://github.com/open-telemetry/opentelemetry-collector#beta
[contrib]:https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib
10 changes: 6 additions & 4 deletions exporter/sumologicexporter/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

//go:generate mdatagen metadata.yaml

package sumologicexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sumologicexporter"

import (
Expand All @@ -21,22 +23,22 @@ import (
"go.opentelemetry.io/collector/component"
"go.opentelemetry.io/collector/exporter"
"go.opentelemetry.io/collector/exporter/exporterhelper"

"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sumologicexporter/internal/metadata"
)

const (
// The value of "type" key in configuration.
typeStr = "sumologic"
// The stability level of the exporter.
stability = component.StabilityLevelBeta
)

// NewFactory returns a new factory for the sumologic exporter.
func NewFactory() exporter.Factory {
return exporter.NewFactory(
typeStr,
createDefaultConfig,
exporter.WithLogs(createLogsExporter, stability),
exporter.WithMetrics(createMetricsExporter, stability),
exporter.WithLogs(createLogsExporter, metadata.Stability),
exporter.WithMetrics(createMetricsExporter, metadata.Stability),
)
}

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions exporter/sumologicexporter/metadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: sumologic

status:
type: exporter
stability: beta
pipelines: [logs, metrics]
distributions: [contrib]

0 comments on commit fba62fa

Please sign in to comment.