Skip to content

Commit

Permalink
[exporter/tencent] use generated status header (open-telemetry#20723)
Browse files Browse the repository at this point in the history
This PR updates the component to generate the status table using mdatagen. 

See related issue: open-telemetry#19172

Signed-off-by: Alex Boten <aboten@lightstep.com>
  • Loading branch information
Alex Boten authored and vincentfree committed Apr 18, 2023
1 parent 57943d6 commit fc21f89
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 8 deletions.
12 changes: 7 additions & 5 deletions exporter/tencentcloudlogserviceexporter/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
# TencentCloud LogService Exporter

<!-- status autogenerated section -->
| Status | |
| ------------------------ |-----------|
| Stability | [beta] |
| Supported pipeline types | logs |
| Stability | [beta] |
| Supported pipeline types | logs |
| 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 OpenTelemetry log data to [LogService](https://cloud.tencent.com/product/cls).

# Configuration options:
Expand Down Expand Up @@ -51,6 +56,3 @@ service:

- 2021-11-10 Change configuration item **endpoint** to **region**, by @wgliang
- 2021-11-01 Initial implementation by @wgliang in #5722

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

//go:generate mdatagen metadata.yaml

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

import (
"context"

"go.opentelemetry.io/collector/component"
"go.opentelemetry.io/collector/exporter"

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

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

// NewFactory creates a factory for tencentcloud LogService exporter.
func NewFactory() exporter.Factory {
return exporter.NewFactory(
typeStr,
createDefaultConfig,
exporter.WithLogs(createLogsExporter, stability))
exporter.WithLogs(createLogsExporter, metadata.Stability))
}

// CreateDefaultConfig creates the default configuration for exporter.
Expand Down

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

8 changes: 8 additions & 0 deletions exporter/tencentcloudlogserviceexporter/metadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: tencentcloudlogsserviceexporter

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

0 comments on commit fc21f89

Please sign in to comment.