Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
9caf5f6
[exporter/natscorexporter]: Initial commit
EthanKim8683 Aug 22, 2025
d7f16cd
Merge branch 'main' of github.com:EthanKim8683/opentelemetry-collecto…
EthanKim8683 Aug 22, 2025
c4161f9
[chore]: Run 'First PR' commands
EthanKim8683 Aug 22, 2025
065c44f
[docs]: Fix punctuation in README
EthanKim8683 Aug 22, 2025
78a1eba
[chore]: Regenerate CODEOWNERS
EthanKim8683 Aug 22, 2025
ddd5f11
Merge branch 'main' into main
EthanKim8683 Aug 22, 2025
7b43451
[feat]: Decentralized NKey auth via credentials file
EthanKim8683 Aug 22, 2025
f3e4f5b
Merge branch 'main' of github.com:EthanKim8683/opentelemetry-collecto…
EthanKim8683 Aug 22, 2025
1a948e2
[chore]: Update config comments for clarity
EthanKim8683 Aug 22, 2025
c7a3aa2
[docs]: Fix grammar in README
EthanKim8683 Aug 22, 2025
cb6e052
[style]: Restructured config for clarity
EthanKim8683 Aug 22, 2025
8e1c352
[docs]: Configuration option name c
EthanKim8683 Aug 22, 2025
2ac9c15
[docs]: Update for clarity
EthanKim8683 Aug 22, 2025
ee18304
Merge branch 'main' into main
EthanKim8683 Aug 23, 2025
8e558b9
[docs]: Add TODO for subject templates
EthanKim8683 Aug 23, 2025
64b4cfd
[docs]: Remove TODO; concern over subject templates resolved
EthanKim8683 Aug 23, 2025
0e96219
Merge branch 'main' into main
EthanKim8683 Aug 24, 2025
49fef87
[feat]: Use OTTL value expressions instead of template strings
EthanKim8683 Aug 27, 2025
984cb5d
Merge branch 'main' into main
EthanKim8683 Aug 27, 2025
28d1a11
[docs]: Correct subject example
EthanKim8683 Aug 27, 2025
d8aab51
Merge branch 'main' of github.com:EthanKim8683/opentelemetry-collecto…
EthanKim8683 Aug 27, 2025
56bba49
[style]: Break lines by logic instead of length
EthanKim8683 Aug 27, 2025
d0dceb4
[feat]: Add groups and marshalers
EthanKim8683 Aug 27, 2025
37d46c9
Merge branch 'main' into groupers-and-marshalers
EthanKim8683 Aug 27, 2025
31a8313
[fix]: Resolve make errors
EthanKim8683 Aug 28, 2025
a4b98ff
Merge branch 'groupers-and-marshalers' of github.com:EthanKim8683/ope…
EthanKim8683 Aug 28, 2025
29c77b9
[style]: Fix minor formatting error in traces_grouper.go
EthanKim8683 Aug 28, 2025
505c302
[refactor]: Refactor marshaler for modular initialization
EthanKim8683 Sep 3, 2025
8c8f6bc
exporter-and-factory
EthanKim8683 Sep 3, 2025
7389827
[chore]: Minor marshaler tests and exporter cleanup
EthanKim8683 Sep 3, 2025
0396844
[refactor]: Refactored grouper tests
EthanKim8683 Sep 4, 2025
fe8c706
[feat]: Add NATS Pedantic mode
EthanKim8683 Sep 4, 2025
1748bbf
[fix]: Add Pedantic option to README and default config
EthanKim8683 Sep 4, 2025
b0abed0
[style]: Minor wording/naming changes
EthanKim8683 Sep 4, 2025
fd844b6
[test]: Improve grouper tests
EthanKim8683 Sep 5, 2025
693925f
[style]: Style improvements to grouper tests for readability
EthanKim8683 Sep 5, 2025
291161a
[style]: Naming changes to grouper tests
EthanKim8683 Sep 5, 2025
c30bd69
[test]: Add mocks to exporter test
EthanKim8683 Sep 6, 2025
faa46ec
[refactor]: Exporter tests refactor
EthanKim8683 Sep 7, 2025
f5f0bea
[refactor]: Remove exporter tests in preparation for publishers
EthanKim8683 Sep 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ exporter/loadbalancingexporter/ @open-telemetry
exporter/logicmonitorexporter/ @open-telemetry/collector-contrib-approvers @bogdandrutu @khyatigandhi6 @avadhut123pisal
exporter/logzioexporter/ @open-telemetry/collector-contrib-approvers @yotamloe
exporter/mezmoexporter/ @open-telemetry/collector-contrib-approvers @dashpole @billmeyer @gjanco
exporter/natscoreexporter/ @open-telemetry/collector-contrib-approvers @EthanKim8683
exporter/opencensusexporter/ @open-telemetry/collector-contrib-approvers @open-telemetry/collector-approvers
exporter/opensearchexporter/ @open-telemetry/collector-contrib-approvers @ps48
exporter/otelarrowexporter/ @open-telemetry/collector-contrib-approvers @jmacd @moh-osman3 @lquerel
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/beta_stability.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ body:
- exporter/logicmonitor
- exporter/logzio
- exporter/mezmo
- exporter/natscore
- exporter/opencensus
- exporter/opensearch
- exporter/otelarrow
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ body:
- exporter/logicmonitor
- exporter/logzio
- exporter/mezmo
- exporter/natscore
- exporter/opencensus
- exporter/opensearch
- exporter/otelarrow
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ body:
- exporter/logicmonitor
- exporter/logzio
- exporter/mezmo
- exporter/natscore
- exporter/opencensus
- exporter/opensearch
- exporter/otelarrow
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/other.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ body:
- exporter/logicmonitor
- exporter/logzio
- exporter/mezmo
- exporter/natscore
- exporter/opencensus
- exporter/opensearch
- exporter/otelarrow
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/unmaintained.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ body:
- exporter/logicmonitor
- exporter/logzio
- exporter/mezmo
- exporter/natscore
- exporter/opencensus
- exporter/opensearch
- exporter/otelarrow
Expand Down
1 change: 1 addition & 0 deletions exporter/natscoreexporter/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include ../../Makefile.Common
71 changes: 71 additions & 0 deletions exporter/natscoreexporter/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# NATS Core Exporter

<!-- status autogenerated section -->
| Status | |
| ------------- |-----------|
| Stability | [development]: metrics, logs, traces |
| Distributions | [contrib] |
| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Fnatscore%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Fnatscore) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Fnatscore%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Fnatscore) |
| Code coverage | [![codecov](https://codecov.io/github/open-telemetry/opentelemetry-collector-contrib/graph/main/badge.svg?component=exporter_natscore)](https://app.codecov.io/gh/open-telemetry/opentelemetry-collector-contrib/tree/main/?components%5B0%5D=exporter_natscore&displayType=list) |
| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@EthanKim8683](https://www.github.com/EthanKim8683) |

[development]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/component-stability.md#development
[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib
<!-- end autogenerated section -->

NATS Core exporter exports logs, metrics and traces to [NATS Core](https://docs.nats.io/).

## Configuration

The following configuration options are supported:

- `endpoint` (default = nats://localhost:4222): The NATS server URL.
- `pedantic` (default = true): The option to enable/disable [NATS pedantic mode](https://docs.nats.io/nats-concepts/subjects#pedantic-mode).
- `tls`: See [TLS Configuration Settings](https://github.com/open-telemetry/opentelemetry-collector/blob/main/config/configtls/README.md) for the full set of available options.
- `logs`
- `subject` (default = "otel_logs"): The [OTTL value expression](https://pkg.go.dev/text/template) used to construct NATS subjects for logs.
- `marshaler` (default = otlp_proto): The name of the built-in marshaler used to marshal logs. See [Built-in Marshalers](#built-in-marshalers).
- `encoding_extension`: The name of the encoding extension used to marshal logs. This configuration option is mutually exclusive with `marshaler`. See [Encoding extensions](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/extension/encoding/README.md).
- `metrics`
- `subject` (default = "otel_metrics"): The [OTTL value expression](https://pkg.go.dev/text/template) used to construct NATS subjects for metrics.
- `marshaler` (default = otlp_proto): The name of the built-in marshaler used to marshal metrics. See [Built-in Marshalers](#built-in-marshalers).
- `encoding_extension`: The name of the encoding extension used to marshal metrics. This configuration option is mutually exclusive with `marshaler`. See [Encoding extensions](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/extension/encoding/README.md).
- `traces`
- `subject` (default = "otel_traces"): The [OTTL value expression](https://pkg.go.dev/text/template) used to construct NATS subjects for traces.
- `marshaler` (default = otlp_proto): The name of the built-in marshaler used to marshal traces. See [Built-in Marshalers](#built-in-marshalers).
- `encoding_extension`: The name of the encoding extension used to marshal traces. This configuration option is mutually exclusive with `marshaler`. See [Encoding extensions](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/extension/encoding/README.md).
- `auth`
- `token`: Configuration options for [token auth](https://docs.nats.io/running-a-nats-service/configuration/securing_nats/auth_intro/tokens).
- `token`: The plaintext token.
- `user`: Configuration options for [username/password auth](https://docs.nats.io/running-a-nats-service/configuration/securing_nats/auth_intro/username_password).
- `username`: The plaintext username.
- `password`: The plaintext password.
- `nkey`: Configuration options for [NKey auth](https://docs.nats.io/running-a-nats-service/configuration/securing_nats/auth_intro/nkey_auth).
- `public_key`: The public key.
- `seed`: The seed.
- `nkey_jwt`: Configuration options for [decentralized NKey auth via JWT](https://docs.nats.io/running-a-nats-service/configuration/securing_nats/auth_intro/jwt).
- `jwt`: The JWT.
- `seed`: The seed.
- `nkey_user_file`: Configuration options for [decentralized NKey auth via user file](https://docs.nats.io/using-nats/developer/connecting/creds).
- `user_file`: The path to the user file.

### Built-in marshalers

NATS Core exporter has built-in marshalers for the following built-in encodings:

- `otlp_proto`: Signals are encoded as OTLP Protobuf.
- `otlp_json`: Signals are encoded as OTLP JSON.

## Example Configurations

### Dynamic subjects

To support [subject-based filtering](https://docs.nats.io/nats-concepts/subjects#subject-based-filtering-and-security), NATS Core exporter constructs dynamic subjects using [OTTL value expressions](https://pkg.go.dev/text/template).

Below is an example of dynamic subjects for traces:

```yaml
natscoreexporter:
traces:
subject: 'Format("traces.%s.spans.%s", [span.trace_id, span.span_id])'
```
Loading
Loading