Skip to content

[exporter/tinybird] implement logs propagation#40993

Merged
mx-psi merged 5 commits into
open-telemetry:mainfrom
tinybirdco:exporter-tinybird-logs-implementation
Jul 9, 2025
Merged

[exporter/tinybird] implement logs propagation#40993
mx-psi merged 5 commits into
open-telemetry:mainfrom
tinybirdco:exporter-tinybird-logs-implementation

Conversation

@jordivilaseca

Copy link
Copy Markdown
Contributor

Description

Implement logs propagation for the new Tinybird Exporter. The exporter iterates over the plog data, extracts the required fields (service name, attributes, log severity, etc.), generates an NDJSON, and performs a request to the Tinybird EventsAPI with all the data.

The implementation is inspired in the otlphttp exporter (both perform HTTP requests).

  • Exporter config has been modified to include
    • confighttp.ClientConfig: allow the configuration of the HTTP client
    • configretry.BackOffConfig: allow the configuration of retries,
    • exporterhelper.QueueBatchConfig: allow the configuration of sending queue and batching strategy.
  • Factories have been updated to propagate these new configs

Link to tracking issue

Related to #40475

Testing

Included logs conversion tests and HTTP request tests.

@jordivilaseca jordivilaseca requested review from a team and mx-psi as code owners June 30, 2025 14:19
@jordivilaseca jordivilaseca force-pushed the exporter-tinybird-logs-implementation branch from 58c7403 to caf3f45 Compare June 30, 2025 14:34
Comment thread exporter/tinybirdexporter/config.go Outdated
Comment thread exporter/tinybirdexporter/config.go Outdated
Comment thread exporter/tinybirdexporter/exporter.go Outdated
Comment thread exporter/tinybirdexporter/exporter.go
Comment thread .chloggen/exporter-tinybird-logs-implementation.yaml Outdated
Comment thread exporter/tinybirdexporter/internal/logs.go
Comment thread exporter/tinybirdexporter/internal/utils.go
@jordivilaseca jordivilaseca force-pushed the exporter-tinybird-logs-implementation branch 2 times, most recently from 119b011 to faafcaf Compare July 7, 2025 08:16
@jordivilaseca jordivilaseca force-pushed the exporter-tinybird-logs-implementation branch from faafcaf to 9c07be3 Compare July 8, 2025 15:31
@mx-psi

mx-psi commented Jul 8, 2025

Copy link
Copy Markdown
Member

Can we get an approval from another codeowner before merging?

@mx-psi mx-psi merged commit 4103fab into open-telemetry:main Jul 9, 2025
177 checks passed
@github-actions github-actions Bot added this to the next release milestone Jul 9, 2025
mx-psi pushed a commit that referenced this pull request Jul 14, 2025
#### Description
Implement traces propagation for the new Tinybird Exporter. The exporter
iterates over the ptraces data, extracts the required fields (service
name, attributes, spanID, etc.), generates an NDJSON, and performs a
request to the Tinybird
[EventsAPI](https://www.tinybird.co/docs/forward/get-data-in/events-api)
with all the data.

It's the same implementation done in
[logs](#40993)
but this time focused on traces.


#### Link to tracking issue
Related to #40475


#### Testing
Included traces conversion tests and HTTP request tests.
constanca-m pushed a commit to constanca-m/opentelemetry-collector-contrib that referenced this pull request Jul 21, 2025
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

Implement logs propagation for the new Tinybird Exporter. The exporter
iterates over the plog data, extracts the required fields (service name,
attributes, log severity, etc.), generates an NDJSON, and performs a
request to the Tinybird
[EventsAPI](https://www.tinybird.co/docs/forward/get-data-in/events-api)
with all the data.

The implementation is inspired in the `otlphttp` exporter (both perform
HTTP requests).
- Exporter config has been modified to include
- `confighttp.ClientConfig`: allow the configuration of the HTTP client
  - `configretry.BackOffConfig`: allow the configuration of retries,
- `exporterhelper.QueueBatchConfig`: allow the configuration of sending
queue and batching strategy.
- Factories have been updated to propagate these new configs

<!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Related to
open-telemetry#40475

<!--Describe what testing was performed and which tests were added.-->
#### Testing
Included logs conversion tests and HTTP request tests.
mx-psi pushed a commit that referenced this pull request Jul 21, 2025
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

Implement metrics propagation for the new Tinybird Exporter. The
exporter iterates over the pmetric data, extracts the required fields
(service name, attributes, spanID, etc.), generates an NDJSON, and
performs a request to the Tinybird
[EventsAPI](https://www.tinybird.co/docs/forward/get-data-in/events-api)
with all the data.

It's the same implementation done in
#40993
and
#41248,
but this time focused on metrics. The only difference is that instead of
just having a `SignalConfig` for `Metrics`, it has one for each type of
metric (`MetricsGauge`, `MetricsSum`, `MetricsHistogram`, and
`MetricsExponentialHistogram`). The reason is that each type of metric
is stored in a different datasource in Tinybird (each has different
schema). This is based on the clickhouseexporter.

Now that the three signals have been implemented, the component
lifecycle tests have been re-enabled

<!-- Issue number (e.g. #1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Related to
#40475

<!--Describe the documentation added.-->
#### Documentation
- Modified the exporter README to add the per metric configuration

<!--Please delete paragraphs that you did not use before submitting.-->

---------

Co-authored-by: MoreraAlejandro <amorera@tinybird.co>
@jordivilaseca jordivilaseca deleted the exporter-tinybird-logs-implementation branch August 1, 2025 12:33
Dylan-M pushed a commit to Dylan-M/opentelemetry-collector-contrib that referenced this pull request Aug 5, 2025
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

Implement logs propagation for the new Tinybird Exporter. The exporter
iterates over the plog data, extracts the required fields (service name,
attributes, log severity, etc.), generates an NDJSON, and performs a
request to the Tinybird
[EventsAPI](https://www.tinybird.co/docs/forward/get-data-in/events-api)
with all the data.

The implementation is inspired in the `otlphttp` exporter (both perform
HTTP requests).
- Exporter config has been modified to include
- `confighttp.ClientConfig`: allow the configuration of the HTTP client
  - `configretry.BackOffConfig`: allow the configuration of retries,
- `exporterhelper.QueueBatchConfig`: allow the configuration of sending
queue and batching strategy.
- Factories have been updated to propagate these new configs

<!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Related to
open-telemetry#40475

<!--Describe what testing was performed and which tests were added.-->
#### Testing
Included logs conversion tests and HTTP request tests.
Dylan-M pushed a commit to Dylan-M/opentelemetry-collector-contrib that referenced this pull request Aug 5, 2025
#### Description
Implement traces propagation for the new Tinybird Exporter. The exporter
iterates over the ptraces data, extracts the required fields (service
name, attributes, spanID, etc.), generates an NDJSON, and performs a
request to the Tinybird
[EventsAPI](https://www.tinybird.co/docs/forward/get-data-in/events-api)
with all the data.

It's the same implementation done in
[logs](open-telemetry#40993)
but this time focused on traces.


#### Link to tracking issue
Related to open-telemetry#40475


#### Testing
Included traces conversion tests and HTTP request tests.
Dylan-M pushed a commit to Dylan-M/opentelemetry-collector-contrib that referenced this pull request Aug 5, 2025
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

Implement metrics propagation for the new Tinybird Exporter. The
exporter iterates over the pmetric data, extracts the required fields
(service name, attributes, spanID, etc.), generates an NDJSON, and
performs a request to the Tinybird
[EventsAPI](https://www.tinybird.co/docs/forward/get-data-in/events-api)
with all the data.

It's the same implementation done in
open-telemetry#40993
and
open-telemetry#41248,
but this time focused on metrics. The only difference is that instead of
just having a `SignalConfig` for `Metrics`, it has one for each type of
metric (`MetricsGauge`, `MetricsSum`, `MetricsHistogram`, and
`MetricsExponentialHistogram`). The reason is that each type of metric
is stored in a different datasource in Tinybird (each has different
schema). This is based on the clickhouseexporter.

Now that the three signals have been implemented, the component
lifecycle tests have been re-enabled

<!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Related to
open-telemetry#40475

<!--Describe the documentation added.-->
#### Documentation
- Modified the exporter README to add the per metric configuration

<!--Please delete paragraphs that you did not use before submitting.-->

---------

Co-authored-by: MoreraAlejandro <amorera@tinybird.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants