-
Notifications
You must be signed in to change notification settings - Fork 0
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
SC-20508 Add sematext exporter #2
base: main
Are you sure you want to change the base?
Conversation
If a user enters the wrong region/ app_token it will throw an error
… with a different error. For some reason the recorded request body is nil
@Eromosele-SM "This branch has conflicts that must be resolved" |
bf683ff
to
2146176
Compare
FWIW I saw 2 instances of the following in your merge of main into your fork: (this one for SL, and another for Mezmo) |
Their |
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.
I don't see any major issues here, some small suggestions. Make sure you get some pipelines/checks set up (you may be able to piggyback on upstream CI if you open a draft PR on open-telemetry/opentelemetry-collector-contrib
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.
no specific comments on any of your tests, but it might be useful to open up a draft pr on the contrib repo to benefit from their pipelines they have set up for linting, test coverage, etc.
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.
Yeah i will, once i am done with the logs support
If hostname is not detected the exporter returns an error
* `endpoint` (required) HTTP/S destination for metric receivers. It is dependent on the region: | ||
- US: `spm-receiver.sematext.com` | ||
- EU: `spm-receiver.eu.sematext.com` | ||
* `timeout` (default = 5s) Timeout for requests |
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.
@Eromosele-SM make it match STA timeout?
exporter/sematextexporter/README.md
Outdated
* `US` | ||
* `EU` | ||
* `payload_max_lines` (default = 10_000) Maximum number of lines allowed per HTTP POST request | ||
* `payload_max_bytes` (default = 10_000_000) Maximum number of bytes allowed per HTTP POST request |
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.
@Eromosele-SM I'd check these defaults internally with Sematext first.
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.
That's the suggest for custom metrics. I'd ask STA devs what STA uses.
exporter/sematextexporter/README.md
Outdated
* `payload_max_bytes` (default = 10_000_000) Maximum number of bytes allowed per HTTP POST request | ||
* `metrics_schema` (default = telegraf-prometheus-v2) The chosen metrics schema to write; must be one of: | ||
* `otel-v1` | ||
* `telegraf-prometheus-v2` |
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.
@Eromosele-SM probably only one schema in the end. Also, this Exporter will end up shipping telemetry other than metrics. So maybe you want to structure the README in preparation for that. For example, this particular schema will be only for metrics.
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.
I can always edit the readme when we have logs support ready?
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.
Ofc. I hope the YAML is also structured in anticipation of Exporter sending other telemetry later (so other App tokens, other endpoints, although the region could probably remain general).
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.
A few suggestions made...
@boratanrikulu @otisg |
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.
Just did a quick skip over the surface stuff, not actual code.
|
||
// Validate checks for invalid or missing entries in the configuration. | ||
func (cfg *Config) Validate() error { | ||
if strings.ToLower(cfg.Region) != "eu" && strings.ToLower(cfg.Region) != "us" && strings.ToLower(cfg.Region) != "custom"{ |
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.
Still not sure what "custom" is for. Esp. since in the line below you say only US and EU are allowed.
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.
The custom
is so that we can run tests on the exporter with a mockserver
This PR adds metrics support for Sematext exporter