Skip to content

Commit

Permalink
[exporter/syslog] Update to use generated status
Browse files Browse the repository at this point in the history
  • Loading branch information
kasia-kujawa committed May 15, 2023
1 parent db14276 commit fd64737
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .chloggen/add-syslog-exporter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ change_type: new_component
component: syslogexporter

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Add syslogexporter for sending logs to syslog server
note: Add syslogexporter for sending logs to syslog server

# One or more tracking issues related to the change
issues: [17982]
Expand Down
13 changes: 8 additions & 5 deletions exporter/syslogexporter/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# Syslog Exporter

| Status | |
|--------------------------|---------------|
| Stability | [development] |
| Supported pipeline types | logs |
| Distributions | |
<!-- status autogenerated section -->
| Status | |
| ------------- |-----------|
| Stability | [development]: logs |
| Distributions | [] |

[development]: https://github.com/open-telemetry/opentelemetry-collector#development
<!-- end autogenerated section -->

The syslog exporter supports sending messages to a remote syslog server.

Expand Down
17 changes: 17 additions & 0 deletions exporter/syslogexporter/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

//go:generate mdatagen metadata.yaml

package syslogexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/syslogexporter"
10 changes: 3 additions & 7 deletions exporter/syslogexporter/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,16 @@ import (
"go.opentelemetry.io/collector/component"
"go.opentelemetry.io/collector/exporter"
"go.opentelemetry.io/collector/exporter/exporterhelper"
)

const (
// The value of "type" key in configuration.
typeStr = "syslog"
stabilityLevel = component.StabilityLevelDevelopment
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/syslogexporter/internal/metadata"
)

// NewFactory returns a new factory for the syslog exporter.
func NewFactory() exporter.Factory {
return exporter.NewFactory(
typeStr,
metadata.Type,
createDefaultConfig,
exporter.WithLogs(createLogsExporter, stabilityLevel),
exporter.WithLogs(createLogsExporter, metadata.LogsStability),
)
}

Expand Down
12 changes: 12 additions & 0 deletions exporter/syslogexporter/internal/metadata/generated_status.go

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

6 changes: 6 additions & 0 deletions exporter/syslogexporter/metadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
type: syslog

status:
class: exporter
stability:
development: [logs]

0 comments on commit fd64737

Please sign in to comment.