-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Gcplog targetmanager #3083
Gcplog targetmanager #3083
Conversation
Sorry for too many file changes, its the result of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Took a quick look at this, left a few comments.
Regarding naming, we definitely should call this something GCP related instead of a generic pubsub target.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Lets you to scrape log entries from pubsub topic and send it to lok - Basic `Target` and `TargetManager` - Minimum config to make it work
- Create uniq label to create stream without out-of-order timestamp - extract instance id and timestamp from log entry
- Config changes on pubsub manager for testing
- Rewrite timestamp to avoid out-of-order errors on loki - Minor config changes to Pubsub Target manager
- Rename Pubsub* entities to Gcplog* - Rename pubsub package into gcplog - Add flag `KeepIncomingTimestamp` to toggle between either keeping incoming timestamps or rewriting with current timestamp - Tests for gcplog target - Docs and basic metrics to gcplog target
Codecov Report
@@ Coverage Diff @@
## master #3083 +/- ##
==========================================
- Coverage 63.33% 63.30% -0.03%
==========================================
Files 191 194 +3
Lines 16455 16535 +80
==========================================
+ Hits 10421 10467 +46
- Misses 5089 5119 +30
- Partials 945 949 +4
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3083 +/- ##
==========================================
- Coverage 63.33% 63.30% -0.03%
==========================================
Files 191 194 +3
Lines 16455 16535 +80
==========================================
+ Hits 10421 10467 +46
- Misses 5089 5119 +30
- Partials 945 949 +4
|
What this PR does / why we need it:
Add new target manager to promtail that adds support for pulling logs out of pubsub topic.
Special notes for your reviewer:
Still In-progress
Checklist
Support for exclusion filter(Not applicable here. will be part of terraform script on the cloud config script.)Support for reading messages by ordering key(tried adding ordering key, but didn't work as expected)