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

Document internal instrumentation rules #3247

Closed
binarylogic opened this issue Jul 29, 2020 · 8 comments
Closed

Document internal instrumentation rules #3247

binarylogic opened this issue Jul 29, 2020 · 8 comments
Labels
domain: internal docs Anything related to Vector's internal documentation domain: observability Anything related to monitoring/observing Vector type: task Generic non-code related tasks

Comments

@binarylogic
Copy link
Contributor

binarylogic commented Jul 29, 2020

I think it's time we add instrumentation rules for Vector itself in the CONTRIBUTING.md file. We purposefully deferred this to see what kind of questions come up, but we're starting to fully instrument Vector and consistency will be important.

@binarylogic binarylogic added domain: observability Anything related to monitoring/observing Vector type: task Generic non-code related tasks labels Jul 29, 2020
@fanatid
Copy link
Contributor

fanatid commented Jul 29, 2020

Additional rule: visibility of internal_events -- pub vs pub(crate)?

@bruceg
Copy link
Member

bruceg commented Jul 29, 2020

Also, as @fanatid mentioned in a PM, there is the question of using consts for common strings.

@bruceg
Copy link
Member

bruceg commented Jul 30, 2020

We need to make an official decision on naming before accepting PR #3264. Most of our "error" events are named without an Error suffix, but the name makes it obvious that it represents an error state (ElasticSearchMissingKeys, JsonFailedParse, KubernetesLogsEventAnnotationFailed, etc), but some have the suffix (LuaScriptError, UnixSocketError, etc). I think we should follow the former pattern (they force more descriptive names), but we need to decide either way.

@binarylogic
Copy link
Contributor Author

The only reason I prefer the standardization is because we plan to document all of our errors, what they mean, etc. So I assume this will make it easier to parse these out of the code, but I'm sure there is a better way to go about this.

@juchiast
Copy link
Contributor

About #3264, Error in HTTPBadRequestError is redundant so HTTPBadRequest might be a better name.

@lukesteensen
Copy link
Member

I think we should follow the former pattern (they force more descriptive names), but we need to decide either way.

I agree and prefer the non-Error naming for the same reason. I also want to be careful of lumping everything into a generic "error" bucket. Some are clearly errors, while others are a little more context-dependent and could be expected.

@ktff
Copy link
Contributor

ktff commented Aug 2, 2020

I think we should also decide how to split responsibility between a component and a shared code that it uses.

For example, we have socket and vector sources that emit events_processed and delegate errors, that they can, to shared tcp code which then emits those errors as TcpConnectionError. And on the other hand #3264 makes the shared http code emit both events_processed and errors under HTTPBadRequest event.

I think it's fine delegating errors that we can to their shared code for it to emit, but I'm not so sure for events_processed. If metrics crate could collect span information, it could be fine, but otherwise we would lose information of it's real source, and by extension all events that pass through sources, backed by such shared code, would get aggregated into a single counter.

With #2660 this isn't so important.

@binarylogic binarylogic added the domain: internal docs Anything related to Vector's internal documentation label Aug 7, 2020
@jszwedko
Copy link
Member

jszwedko commented Aug 3, 2022

@jszwedko jszwedko closed this as completed Aug 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain: internal docs Anything related to Vector's internal documentation domain: observability Anything related to monitoring/observing Vector type: task Generic non-code related tasks
Projects
None yet
Development

No branches or pull requests

7 participants