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

Add single writer principle note to deployment documentation #5166

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

michael2893
Copy link

@michael2893 michael2893 commented Sep 8, 2024

Summary

This change addresses the request for documentation on the Single-Writer principle. #4368

Description

  • add section on multiple collector deployments in deployment/gateway
  • define single writer principle
  • provide examples and context

@michael2893 michael2893 requested a review from a team September 8, 2024 15:04
@opentelemetrybot opentelemetrybot requested a review from a team September 8, 2024 15:04
@opentelemetrybot opentelemetrybot requested review from atoulme and removed request for a team September 8, 2024 15:04
@opentelemetrybot opentelemetrybot requested a review from a team September 8, 2024 15:05
Copy link
Contributor

@tiffany76 tiffany76 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First pass copy edits. Thanks!

@@ -218,3 +218,48 @@ Cons:
https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/tailsamplingprocessor
[spanmetrics-connector]:
https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/connector/spanmetricsconnector

## Multiple Collectors / Single Writer Principle
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I spent an absurd amount of time trying to determine if the name of the principle should be capitalized and hyphenated. If we're going for consistency, the spec page uses "Single-Writer principle". I agree with the hyphen when used before "principle", but I think it should all be lowercase. Please (anyone) contradict me if you think otherwise.

Suggested change
## Multiple Collectors / Single Writer Principle
## Multiple collectors and the single-writer principle

Comment on lines 229 to 230


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the extra spaces between paragraphs, here and elsewhere. Thanks!




### Potential Problems
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### Potential Problems
### Potential problems

### Potential Problems

Concurrent access from multiple applications that modify or report on
the same data can lead to data loss or, at least, degraded data
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does concurrent access always lead to degraded data quality? If not, I would remove the "at least".

Suggested change
the same data can lead to data loss or, at least, degraded data
the same data can lead to data loss or degraded data

Comment on lines 236 to 238
quality. An example would be something like inconsistent data from multiple sources
on the same resource, where the different sources can overwrite each other because
the resource is not uniquely identified.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
quality. An example would be something like inconsistent data from multiple sources
on the same resource, where the different sources can overwrite each other because
the resource is not uniquely identified.
quality. For example, you might see inconsistent data from multiple sources
on the same resource, where the different sources can overwrite each other because
the resource is not uniquely identified.

Comment on lines 251 to 252
This could indicate that identical targets exist in two jobs, and the order of
the timestamps is incorrect.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This could indicate that identical targets exist in two jobs, and the order of
the timestamps is incorrect.
This error could indicate that identical targets exist in two jobs, and the order of
the timestamps is incorrect. For example:

This could indicate that identical targets exist in two jobs, and the order of
the timestamps is incorrect.

Ex:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Ex:

- Metric `M1` received at time 13:56:04 with value `110`


### Suggestions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a more descriptive heading we can use here? "Best practices", maybe?

Comment on lines 262 to 263
- Use the [Kubernetes Attributes Processor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/k8sattributesprocessor)
to add labels to kubernetes resources
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Use the [Kubernetes Attributes Processor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/k8sattributesprocessor)
to add labels to kubernetes resources
- Use the [Kubernetes attributes processor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/k8sattributesprocessor)
to add labels to Kubernetes resources.

Comment on lines 264 to 265
- Use the [Resource Detector Processor](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/processor/resourcedetectionprocessor/README.md)
to detect resource information from the host and collect metadata related to them.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Use the [Resource Detector Processor](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/processor/resourcedetectionprocessor/README.md)
to detect resource information from the host and collect metadata related to them.
- Use the [resource detector processor](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/processor/resourcedetectionprocessor/README.md)
to detect resource information from the host and collect resource metadata.

@tiffany76
Copy link
Contributor

tiffany76 commented Sep 9, 2024

Hi @michael2893. Thanks for sticking with this. A couple of the Collector maintainers reviewed the earlier PR (#4433), so I'm going to ask them to take a look here and make sure their comments have been addressed. @jpkrohling, @mx-psi, PTAL. Thanks!

@michael2893 michael2893 requested a review from a team as a code owner September 27, 2024 16:24
@opentelemetrybot opentelemetrybot requested a review from a team September 27, 2024 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants