-
Notifications
You must be signed in to change notification settings - Fork 3
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
added publisher and logger package #28
Conversation
logger/logger.go
Outdated
|
||
// default config log timestamp | ||
const ( | ||
TimestampFormat = "15:04:05.999 02/01/2006 (MST)" |
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.
why MST timezone?
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.
changing it to UTC
Password string `yaml:"password,omitempty" json:"password,omitempty"` | ||
|
||
// ES_7x to know if target is elastic version 7.x | ||
ES_7x bool `yaml:"es_7x" json:"es_7x"` |
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.
Do you need this as input? check if you can query to ES to get version and set this flag. sf-trace-server is likely getting the version on the fly.
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.
will add logic to get version in code itself
ES_7x bool `yaml:"es_7x" json:"es_7x"` | ||
} | ||
|
||
// BulkResponse ... |
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.
add proper comments in all structs
return fmt.Errorf("status code: %d, error: %s", esError.Status, esError.Error.Reason) | ||
} | ||
|
||
// getURL returns url to elasticendpoint for writing data |
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.
Check the elastic beats code
https://github.com/elastic/beats/tree/main/libbeat/outputs
There may be some cases like index does not exist or generating index name based on some fields on doc.
Same for Kafkarest
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.
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.
@upendrasahu created an issue #30 for improvement in publisher
Checklist:
Update index.md
)SUMMARY
COMPONENT NAME
Publisher
ADDITIONAL INFORMATION
Current implementation is not based on original design as Tasks are already running in goroutines so publisher instances need
not run in multiple goroutines.