Skip to content

Commit

Permalink
capitalization and links within godocs
Browse files Browse the repository at this point in the history
Co-authored-by: Pablo Baeyens <pbaeyens31+github@gmail.com>
  • Loading branch information
ankitpatel96 and mx-psi committed May 8, 2024
1 parent 15fd22d commit 4840b90
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion component/component.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

// Package component outlines the abstraction of components within OTEL collector. It provides details on the component
// Package component outlines the abstraction of components within the OpenTelemetry Collector. It provides details on the component
// lifecycle as well as defining the interface that components must fulfill.
package component // import "go.opentelemetry.io/collector/component"

Expand Down
16 changes: 9 additions & 7 deletions docs/internal-architecture.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## Collector internal architecture
There are a few resources available to understand how the collector works:
## Internal architecture

There are a few resources available to understand how the Collector works:

### Startup Diagram
```mermaid
flowchart TD
Expand Down Expand Up @@ -30,20 +32,20 @@ flowchart TD
Iterates through the pipelines and creates edges between components`")
I --> L("`**buildComponents**
Topological sort the graph, and create each component in reverse order`")
L --> M(Receiver Factory) & N(Processor Factory) & O(Exporter Factory)
L --> M(Receiver Factory) & N(Processor Factory) & O(Exporter Factory) & P(Connector Factory)
```
### Important Files
Here is a brief list of useful and/or important files and interfaces that you may find valuable to glance through.
Most of these have package level documentation and function / struct level comments that help explain the collector!
Most of these have package level documentation and function / struct level comments that help explain the Collector!

- [collector.go](../otelcol/collector.go)
- [graph.go](../service/internal/graph/graph.go)
- [component.go](../component/component.go)

#### Factories
Each component type contains a Factory interface along with its corresponding NewFactory function.
Implementations of new components use this NewFactory function in their implementation to register key functions with
the collector. For example, the collector uses this interface to give receivers a handle to a nextConsumer -
Each component type contains a `Factory` interface along with its corresponding `NewFactory` function.
Implementations of new components use this `NewFactory` function in their implementation to register key functions with
the Collector. For example, the Collector uses this interface to give receivers a handle to a `nextConsumer` -
representing where the receiver can send data to that it has received.
An example of this is in [exporter.go](../exporter/exporter.go)

Expand Down
4 changes: 2 additions & 2 deletions otelcol/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
// SPDX-License-Identifier: Apache-2.0

// Package otelcol handles the command-line, configuration, and runs the OpenTelemetry Collector.
// otelcol/collector.go contains the main Collector struct and its constructor [NewCollector].
// It contains the main [Collector] struct and its constructor [NewCollector].
// [Collector.Run] starts the collector blocks until it shuts down.
// [Collector.setupConfigurationComponents] is the "main" function responsible for startup - it orchestrates the loading of the
// Collector.setupConfigurationComponents is the "main" function responsible for startup - it orchestrates the loading of the
// configuration, the creation of the graph, and the starting of all the components.
package otelcol // import "go.opentelemetry.io/collector/otelcol"

Expand Down

0 comments on commit 4840b90

Please sign in to comment.