Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lokiexporter: Implementation ( PR 2/3 ) #2262

Merged
merged 3 commits into from
Feb 13, 2021
Merged

lokiexporter: Implementation ( PR 2/3 ) #2262

merged 3 commits into from
Feb 13, 2021

Conversation

gramidt
Copy link
Member

@gramidt gramidt commented Feb 1, 2021

Description:
The implementation of the Loki exporter.

Link to tracking Issue:
#1894

Testing:
Unit Tests

Documentation:
Godoc and README

Notes:
#1952 was the original PR, but we were unable to re-open it after it was closed for being stale.

@gramidt gramidt mentioned this pull request Feb 1, 2021
@codecov
Copy link

codecov bot commented Feb 4, 2021

Codecov Report

Merging #2262 (6e323bf) into main (339dd56) will increase coverage by 0.02%.
The diff coverage is 96.19%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2262      +/-   ##
==========================================
+ Coverage   90.60%   90.62%   +0.02%     
==========================================
  Files         401      402       +1     
  Lines       19899    19985      +86     
==========================================
+ Hits        18029    18111      +82     
- Misses       1413     1414       +1     
- Partials      457      460       +3     
Flag Coverage Δ
integration 69.26% <ø> (-0.07%) ⬇️
unit 89.44% <96.19%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
exporter/lokiexporter/exporter.go 94.80% <94.80%> (ø)
exporter/lokiexporter/config.go 100.00% <100.00%> (ø)
exporter/lokiexporter/factory.go 94.73% <100.00%> (-5.27%) ⬇️
receiver/k8sclusterreceiver/watcher.go 95.29% <0.00%> (-2.36%) ⬇️
processor/groupbytraceprocessor/event.go 95.96% <0.00%> (-0.81%) ⬇️
receiver/prometheusexecreceiver/receiver.go 88.33% <0.00%> (+2.50%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 339dd56...6e323bf. Read the comment docs.

@gramidt gramidt marked this pull request as ready for review February 7, 2021 17:34
@gramidt gramidt requested a review from a team February 7, 2021 17:34
@gramidt gramidt changed the title [Lokiexporter] Implementation ( PR 2/3 ) lokiexporter: Implementation ( PR 2/3 ) Feb 7, 2021
@gramidt
Copy link
Member Author

gramidt commented Feb 9, 2021

Happy Tuesday, @kbrockhoff!

Hope your week is off to a great start! Do you have a timeframe when you would be able to review this? No rush, just need to ensure that I block out time to respond promptly during the review process.

Thank you for all of your help in the Otel community!

@gramidt gramidt requested a review from kbrockhoff February 11, 2021 04:04
@cyriltovena
Copy link

Nice work @gramidt appreciate the effort 👏

We're starting a new repo for easing client integration here https://github.com/grafana/loki-client-go , I'm not saying you should use this, but just wanted to make you aware :) it would simplify your go.mod and how much vendor you have to pull into this repository.

How does the log push request batching is working ? Sorry to ask I'm not familiar with open-telemetry log collector.

@gramidt
Copy link
Member Author

gramidt commented Feb 11, 2021

@cyriltovena - Thank you so much! I'm so glad to see that a Loki client was split out. This will definitely help with the inevitable dependency issue. I will go ahead and use the protos from 'loki-client-go' now, then submit a future PR with updating the code to use the other pieces of the client where applicable.

The OpenTelemetry Collector has the concept of Receivers, Processors, and Exporters. Receivers are responsible for getting data from systems (push or pull), Processors are responsible for processing the data (Batching, Queueing, Sampling, etc), and Exporters are responsible for sending the data off to a another system to either continue processing or storing the data. Here is the list of the "core" processors: https://github.com/open-telemetry/opentelemetry-collector/blob/main/processor/README.md . There are also additional "contrib" processors in this repo.

@gramidt
Copy link
Member Author

gramidt commented Feb 11, 2021

@cyriltovena - After taking another look at the project, I will switch over to 'loki-client-go' for the protos after an official release of it is out. Looking forward to when it's available. :)

@gramidt
Copy link
Member Author

gramidt commented Feb 11, 2021

Thank you for all of your help, @kbrockhoff!

@gramidt
Copy link
Member Author

gramidt commented Feb 11, 2021

@bogdandrutu - When you're available, could you merge this?

@bogdandrutu bogdandrutu merged commit cdd027b into open-telemetry:main Feb 13, 2021
@gramidt gramidt deleted the loki-exporter-imp branch February 14, 2021 00:36
pmatyjasek-sumo referenced this pull request in pmatyjasek-sumo/opentelemetry-collector-contrib Apr 28, 2021
* added initial loki exporter implementation

Signed-off-by: Granville Schmidt <[email protected]>

* updated exporter to use consumererrors to enable exporthelper retry logic

Signed-off-by: Granville Schmidt <[email protected]>

* added memory limiter processor to example

Signed-off-by: Granville Schmidt <[email protected]>
ljmsc referenced this pull request in ljmsc/opentelemetry-collector-contrib Feb 21, 2022
…ptracegrpc (#2262)

* Bump google.golang.org/grpc in /example/otel-collector

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.40.0 to 1.41.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](grpc/grpc-go@v1.40.0...v1.41.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump google.golang.org/grpc in /exporters/otlp/otlpmetric/otlpmetricgrpc

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.40.0 to 1.41.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](grpc/grpc-go@v1.40.0...v1.41.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump google.golang.org/grpc in /exporters/otlp/otlptrace/otlptracegrpc

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.40.0 to 1.41.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](grpc/grpc-go@v1.40.0...v1.41.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump google.golang.org/grpc in /exporters/otlp/otlpmetric

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.40.0 to 1.41.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](grpc/grpc-go@v1.40.0...v1.41.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump google.golang.org/grpc in /exporters/otlp/otlptrace

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.40.0 to 1.41.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](grpc/grpc-go@v1.40.0...v1.41.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Auto-fix go.sum changes in dependent modules

* go.sum/mod updates

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants