Skip to content

Commit d9cbd28

Browse files
committed
move custmized collector build readme section to the collectors README
1 parent e66987f commit d9cbd28

File tree

2 files changed

+40
-40
lines changed

2 files changed

+40
-40
lines changed

README.md

Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Some layers include the corresponding OTel language SDK for the Lambda. This all
2626
* **What exporters/receivers/processors are included from the OpenTelemetry Collector?**
2727
> You can check out [the stripped-down collector's imports](https://github.com/open-telemetry/opentelemetry-lambda/blob/main/collector/lambdacomponents/default.go#L18) in this repository for a full list of currently included components.
2828
29-
> Self-built binaries of the collector have **experimental** support for a custom set of connectors/exporters/receivers/processors. For more information, see [(Experimental) Customized collector build](#experimental-customized-collector-build)
29+
> Self-built binaries of the collector have **experimental** support for a custom set of connectors/exporters/receivers/processors. For more information, see [(Experimental) Customized collector build](./collector/README.md#experimental-customized-collector-build)
3030
* **Is the Lambda layer provided or do I need to build it and distribute it myself?**
3131
> This repository provides pre-built Lambda layers, their ARNs are available in the [Releases](https://github.com/open-telemetry/opentelemetry-lambda/releases). You can also build the layers manually and publish them in your AWS account. This repo has files to facilitate doing that. More information is provided in [the Collector folder's README](collector/README.md).
3232
@@ -101,45 +101,6 @@ The following are runtimes which are no longer or not yet supported by this repo
101101
[3]: https://github.com/open-telemetry/semantic-conventions/blob/main/docs/faas/faas-spans.md#outgoing-invocations
102102
[4]: https://github.com/open-telemetry/semantic-conventions/blob/main/docs/faas/faas-metrics.md
103103

104-
## (Experimental) Customized collector build
105-
The collector can be built with a customized set of connectors/exporters/receivers/processors. This feature is **experimental** and is only supported for self-built binaries of the collector.
106-
107-
### Build Tags
108-
The build-tag `lambdacomponents.custom` must always be provided to opt-in for a custom build.
109-
Once this build-tag is present, you need provide additional build-tags to include your desired components in the resulting binary:
110-
111-
- `lambdacomponents.all` includes all available components
112-
- `lambdacomponents.connector.all` includes all available connectors
113-
- `lambdacomponents.exporter.all` includes all available exporters
114-
- `lambdacomponents.extension.all` includes all available extensions
115-
- `lambdacomponents.processor.all` includes all available processors
116-
- `lambdacomponents.receiver.all` includes all available receivers
117-
118-
Each available component can also be included explicitly by using its specific build-tag. For a full-list of available components, have a look into the [lambdacomponents](./collector/lambdacomponents) package.
119-
120-
As an example, the full build command including the following components:
121-
- All receivers
122-
- All processors
123-
- No extensions
124-
- Only the otlphttp exporter
125-
- Only the spanmetrics connector
126-
127-
would be the following:
128-
```shell
129-
go build -tags "lambdacomponents.custom,lambdacomponents.receiver.all,lambdacomponents.processor.all,lambdacomponents.exporter.otlphttp,lambdacomponents.connector.spanmetrics"
130-
```
131-
132-
### Adding additional options
133-
To add more options for a customized build, you can add your desired component to the [lambdacomponents](./collector/lambdacomponents) package.
134-
Make sure to always restrict your addition using the appropriate build-tags.
135-
136-
For example, if you want to add the extension `foo`, the file providing this extension should be located in the [extension](./collector/lambdacomponents/extension) directory have the following build restriction:
137-
```
138-
//go:build lambdacomponents.custom && (lambdacomponents.all || lambdacomponents.extension.all || lambdacomponents.extension.foo)
139-
```
140-
141-
You can provide your addition as a pull-request to this repository. Before doing so, please also read through the details of [Contributing](#contributing) to this project.
142-
143104
## Contributing
144105

145106
See the [Contributing Guide](CONTRIBUTING.md) for details.

collector/README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,45 @@ Be sure to:
1313
* Install [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html)
1414
* Config [AWS credential](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html)
1515

16+
## (Experimental) Customized collector build
17+
The collector can be built with a customized set of connectors/exporters/receivers/processors. This feature is **experimental** and is only supported for self-built binaries of the collector.
18+
19+
### Build Tags
20+
The build-tag `lambdacomponents.custom` must always be provided to opt-in for a custom build.
21+
Once this build-tag is present, you need provide additional build-tags to include your desired components in the resulting binary:
22+
23+
- `lambdacomponents.all` includes all available components
24+
- `lambdacomponents.connector.all` includes all available connectors
25+
- `lambdacomponents.exporter.all` includes all available exporters
26+
- `lambdacomponents.extension.all` includes all available extensions
27+
- `lambdacomponents.processor.all` includes all available processors
28+
- `lambdacomponents.receiver.all` includes all available receivers
29+
30+
Each available component can also be included explicitly by using its specific build-tag. For a full-list of available components, have a look into the [lambdacomponents](./collector/lambdacomponents) package.
31+
32+
As an example, the full build command including the following components:
33+
- All receivers
34+
- All processors
35+
- No extensions
36+
- Only the otlphttp exporter
37+
- Only the spanmetrics connector
38+
39+
would be the following:
40+
```shell
41+
go build -tags "lambdacomponents.custom,lambdacomponents.receiver.all,lambdacomponents.processor.all,lambdacomponents.exporter.otlphttp,lambdacomponents.connector.spanmetrics"
42+
```
43+
44+
### Adding additional options
45+
To add more options for a customized build, you can add your desired component to the [lambdacomponents](./collector/lambdacomponents) package.
46+
Make sure to always restrict your addition using the appropriate build-tags.
47+
48+
For example, if you want to add the extension `foo`, the file providing this extension should be located in the [extension](./collector/lambdacomponents/extension) directory have the following build restriction:
49+
```
50+
//go:build lambdacomponents.custom && (lambdacomponents.all || lambdacomponents.extension.all || lambdacomponents.extension.foo)
51+
```
52+
53+
You can provide your addition as a pull-request to this repository. Before doing so, please also read through the details of [Contributing](#contributing) to this project.
54+
1655
## Installing
1756
To install the OpenTelemetry Collector Lambda layer to an existing Lambda function using the `aws` CLI:
1857

0 commit comments

Comments
 (0)