Skip to content

Commit daaaf62

Browse files
authored
[wip] Add skeleton for the otlpjson connector (#34239)
**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 is the first PR for the new `otlpjson` connector. Includes the overall structure of the new component. **Link to tracking Issue:** <Issue number if applicable> #34208 **Testing:** <Describe what testing was performed and which tests were added.> **Documentation:** <Describe the documentation added.> /cc @djaglowski Signed-off-by: ChrsMark <[email protected]>
1 parent d5c40d3 commit daaaf62

25 files changed

+680
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Use this changelog template to create an entry for release notes.
2+
3+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
4+
change_type: new_component
5+
6+
# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
7+
component: otlpjsonconnector
8+
9+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
10+
note: New component that will allow extracting otlpjson data from incoming Logs.
11+
12+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
13+
issues: [34239, 34208]
14+
15+
# (Optional) One or more lines of additional information to render under the primary note.
16+
# These lines will be padded with 2 spaces and then inserted directly into the document.
17+
# Use pipe (|) for multiline entries.
18+
subtext:
19+
20+
# If your change doesn't affect end users or the exported elements of any package,
21+
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
22+
# Optional: The change log or logs in which this entry should be included.
23+
# e.g. '[user]' or '[user, api]'
24+
# Include 'user' if the change is relevant to end users.
25+
# Include 'api' if there is a change to a library API.
26+
# Default: '[user]'
27+
change_logs: []

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ connector/datadogconnector/ @open-teleme
2929
connector/exceptionsconnector/ @open-telemetry/collector-contrib-approvers @jpkrohling @marctc
3030
connector/failoverconnector/ @open-telemetry/collector-contrib-approvers @akats7 @djaglowski @fatsheep9146
3131
connector/grafanacloudconnector/ @open-telemetry/collector-contrib-approvers @jpkrohling @rlankfo @jcreixell
32+
connector/otlpjsonconnector/ @open-telemetry/collector-contrib-approvers @djaglowski @ChrsMark
3233
connector/roundrobinconnector/ @open-telemetry/collector-contrib-approvers @bogdandrutu
3334
connector/routingconnector/ @open-telemetry/collector-contrib-approvers @jpkrohling @mwear
3435
connector/servicegraphconnector/ @open-telemetry/collector-contrib-approvers @jpkrohling @mapno @JaredTan95

.github/ISSUE_TEMPLATE/bug_report.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ body:
3030
- connector/exceptions
3131
- connector/failover
3232
- connector/grafanacloud
33+
- connector/otlpjson
3334
- connector/roundrobin
3435
- connector/routing
3536
- connector/servicegraph

.github/ISSUE_TEMPLATE/feature_request.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ body:
2424
- connector/exceptions
2525
- connector/failover
2626
- connector/grafanacloud
27+
- connector/otlpjson
2728
- connector/roundrobin
2829
- connector/routing
2930
- connector/servicegraph

.github/ISSUE_TEMPLATE/other.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ body:
2424
- connector/exceptions
2525
- connector/failover
2626
- connector/grafanacloud
27+
- connector/otlpjson
2728
- connector/roundrobin
2829
- connector/routing
2930
- connector/servicegraph

.github/ISSUE_TEMPLATE/unmaintained.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ body:
2929
- connector/exceptions
3030
- connector/failover
3131
- connector/grafanacloud
32+
- connector/otlpjson
3233
- connector/roundrobin
3334
- connector/routing
3435
- connector/servicegraph
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
include ../../Makefile.Common
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# otlpjson Connector
2+
3+
<!-- status autogenerated section -->
4+
| Status | |
5+
| ------------- |-----------|
6+
| Distributions | [contrib] |
7+
| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aconnector%2Fotlpjson%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aconnector%2Fotlpjson) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aconnector%2Fotlpjson%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aconnector%2Fotlpjson) |
8+
| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@djaglowski](https://www.github.com/djaglowski), [@ChrsMark](https://www.github.com/ChrsMark) |
9+
10+
[development]: https://github.com/open-telemetry/opentelemetry-collector#development
11+
[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib
12+
13+
## Supported Pipeline Types
14+
15+
| [Exporter Pipeline Type] | [Receiver Pipeline Type] | [Stability Level] |
16+
| ------------------------ | ------------------------ | ----------------- |
17+
| logs | metrics | [development] |
18+
| logs | traces | [development] |
19+
| logs | logs | [development] |
20+
21+
[Exporter Pipeline Type]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/connector/README.md#exporter-pipeline-type
22+
[Receiver Pipeline Type]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/connector/README.md#receiver-pipeline-type
23+
[Stability Level]: https://github.com/open-telemetry/opentelemetry-collector#stability-levels
24+
<!-- end autogenerated section -->
25+
26+
Allows to extract otlpjson data from incoming Logs and specifically the `Body` field.
27+
The data is written in
28+
[Protobuf JSON
29+
encoding](https://developers.google.com/protocol-buffers/docs/proto3#json)
30+
using [OpenTelemetry
31+
protocol](https://github.com/open-telemetry/opentelemetry-proto).
32+
33+
## Configuration
34+
35+
#### Configuration Example:
36+
37+
```yaml
38+
receivers:
39+
filelog:
40+
include:
41+
- /var/log/foo.log
42+
43+
exporters:
44+
debug:
45+
46+
connectors:
47+
otlpjson:
48+
49+
service:
50+
pipelines:
51+
logs/raw:
52+
receivers: [filelog]
53+
exporters: [otlpjson]
54+
metrics/otlp:
55+
receivers: [otlpjson]
56+
exporters: [debug]
57+
logs/otlp:
58+
receivers: [otlpjson]
59+
exporters: [debug]
60+
traces/otlp:
61+
receivers: [otlpjson]
62+
exporters: [debug]
63+
```
64+
65+
[Connectors README]:https://github.com/open-telemetry/opentelemetry-collector/blob/main/connector/README.md
66+
[Exporter Pipeline Type]:https://github.com/open-telemetry/opentelemetry-collector/blob/main/connector/README.md#exporter-pipeline-type
67+
[Receiver Pipeline Type]:https://github.com/open-telemetry/opentelemetry-collector/blob/main/connector/README.md#receiver-pipeline-type
68+
[contrib]:https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Copyright The OpenTelemetry Authors
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
package otlpjsonconnector // import "github.com/open-telemetry/opentelemetry-collector-contrib/connector/otlpjsonconnector"
5+
6+
type Config struct{}
7+
8+
func (c *Config) Validate() error {
9+
return nil
10+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// Copyright The OpenTelemetry Authors
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
package otlpjsonconnector

0 commit comments

Comments
 (0)