Skip to content

Commit 8abefcc

Browse files
[chore] Fix make for-all command (open-telemetry#43572)
#### Description open-telemetry#43509 changed the `make for-all` Makefile target to access the `ALL_MODS` variable through environment variables instead of expanding it into the shell command, in order to bypass Windows' 8192 byte command line length limit. However, the environment variable was not defined, which led to `make for-all` becoming a no-op. This can be confirmed by running `make for-all CMD='echo test'`. (I discovered this issue because [this PR](open-telemetry/opentelemetry-collector#13996) in core repository, which should be failing `contrib-tests`, suddenly started passing them. This was because the job inserts `replace` statements in a copy of contrib using `for-all`; failing to do that caused the contrib tests to run against whatever version of core is imported here rather than against the PR's code.) This PR fixes that oversight, by adding the `export` keyword to the `ALL_MODS` variable.
1 parent 05a0c24 commit 8abefcc

File tree

4 files changed

+26
-26
lines changed

4 files changed

+26
-26
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ PKG_MODS := $(shell find ./pkg/* $(FIND_MOD_ARGS) -exec $(TO_MOD_DIR) )
4545
CMD_MODS_0 := $(shell find ./cmd/[a-z]* $(FIND_MOD_ARGS) -not -path "./cmd/otel*col/*" -exec $(TO_MOD_DIR) )
4646
CMD_MODS := $(CMD_MODS_0)
4747
OTHER_MODS := $(shell find . $(EX_COMPONENTS) $(EX_INTERNAL) $(EX_PKG) $(EX_CMD) $(FIND_MOD_ARGS) -exec $(TO_MOD_DIR) )
48-
ALL_MODS := $(RECEIVER_MODS) $(PROCESSOR_MODS) $(EXPORTER_MODS) $(EXTENSION_MODS) $(CONNECTOR_MODS) $(INTERNAL_MODS) $(PKG_MODS) $(CMD_MODS) $(OTHER_MODS)
48+
export ALL_MODS := $(RECEIVER_MODS) $(PROCESSOR_MODS) $(EXPORTER_MODS) $(EXTENSION_MODS) $(CONNECTOR_MODS) $(INTERNAL_MODS) $(PKG_MODS) $(CMD_MODS) $(OTHER_MODS)
4949

5050
CGO_MODS := ./receiver/hostmetricsreceiver
5151

@@ -222,7 +222,7 @@ goporto: $(PORTO)
222222

223223
.PHONY: for-all
224224
for-all:
225-
@set -e; for dir in $${ALL_MODS}; do \
225+
@set -e; for dir in $$ALL_MODS; do \
226226
(cd "$${dir}" && \
227227
echo "running $${CMD} in $${dir}" && \
228228
$${CMD} ); \

receiver/ciscoosreceiver/documentation.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Number of bytes received on the interface
1818
1919
| Unit | Metric Type | Value Type |
2020
| ---- | ----------- | ---------- |
21-
| bytes | Gauge | Int |
21+
| By | Gauge | Int |
2222
2323
#### Attributes
2424
@@ -33,7 +33,7 @@ Number of receive errors on the interface
3333
3434
| Unit | Metric Type | Value Type |
3535
| ---- | ----------- | ---------- |
36-
| errors | Gauge | Int |
36+
| {error} | Gauge | Int |
3737
3838
#### Attributes
3939
@@ -48,7 +48,7 @@ Number of bytes transmitted on the interface
4848
4949
| Unit | Metric Type | Value Type |
5050
| ---- | ----------- | ---------- |
51-
| bytes | Gauge | Int |
51+
| By | Gauge | Int |
5252
5353
#### Attributes
5454
@@ -63,7 +63,7 @@ Number of transmit errors on the interface
6363
6464
| Unit | Metric Type | Value Type |
6565
| ---- | ----------- | ---------- |
66-
| errors | Gauge | Int |
66+
| {error} | Gauge | Int |
6767
6868
#### Attributes
6969
@@ -89,19 +89,19 @@ Interface operational status (1 for up, 0 for down)
8989
9090
### cisco.system.cpu.utilization
9191
92-
CPU utilization percentage
92+
CPU utilization as a fraction
9393
9494
| Unit | Metric Type | Value Type |
9595
| ---- | ----------- | ---------- |
96-
| % | Gauge | Double |
96+
| 1 | Gauge | Double |
9797
9898
### cisco.system.memory.utilization
9999
100-
Memory utilization percentage
100+
Memory utilization as a fraction
101101
102102
| Unit | Metric Type | Value Type |
103103
| ---- | ----------- | ---------- |
104-
| % | Gauge | Double |
104+
| 1 | Gauge | Double |
105105
106106
## Resource Attributes
107107

receiver/ciscoosreceiver/internal/metadata/generated_metrics.go

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

receiver/ciscoosreceiver/internal/metadata/generated_metrics_test.go

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)