Skip to content

Commit 7b3d010

Browse files
committed
Rename bytes to bytes_read for read cache
1 parent 727400d commit 7b3d010

File tree

9 files changed

+36
-36
lines changed

9 files changed

+36
-36
lines changed

internal/collector/nginxplusreceiver/documentation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ metrics:
1212
enabled: false
1313
```
1414
15-
### nginx.cache.bytes
15+
### nginx.cache.bytes_read
1616
1717
The total number of bytes read from the cache or proxied server.
1818

internal/collector/nginxplusreceiver/internal/metadata/generated_config.go

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

internal/collector/nginxplusreceiver/internal/metadata/generated_config_test.go

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

internal/collector/nginxplusreceiver/internal/metadata/generated_metrics.go

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

internal/collector/nginxplusreceiver/internal/metadata/generated_metrics_test.go

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

internal/collector/nginxplusreceiver/internal/metadata/testdata/config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
default:
22
all_set:
33
metrics:
4-
nginx.cache.bytes:
4+
nginx.cache.bytes_read:
55
enabled: true
66
nginx.cache.memory.limit:
77
enabled: true
@@ -124,7 +124,7 @@ all_set:
124124
enabled: true
125125
none_set:
126126
metrics:
127-
nginx.cache.bytes:
127+
nginx.cache.bytes_read:
128128
enabled: false
129129
nginx.cache.memory.limit:
130130
enabled: false

internal/collector/nginxplusreceiver/metadata.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ status:
77
beta: [metrics]
88
distributions: [contrib]
99
codeowners:
10-
active: [olli-holmala, oliveromahony, apgralG, dhurley, craigell, sean-breen]
10+
active: [apgralG, dhurley, craigell, sean-breen, Rashmiti, CVanF5]
1111

1212
resource_attributes:
1313
instance.id:
@@ -173,7 +173,7 @@ metrics:
173173
gauge:
174174
value_type: int
175175
unit: "requests"
176-
nginx.cache.bytes:
176+
nginx.cache.bytes_read:
177177
enabled: true
178178
description: The total number of bytes read from the cache or proxied server.
179179
sum:

internal/collector/nginxplusreceiver/scraper.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -917,38 +917,38 @@ func (nps *nginxPlusScraper) recordHTTPLimitMetrics(stats *plusapi.Stats, now pc
917917

918918
func (nps *nginxPlusScraper) recordCacheMetrics(stats *plusapi.Stats, now pcommon.Timestamp) {
919919
for name, cache := range stats.Caches {
920-
nps.mb.RecordNginxCacheBytesDataPoint(
920+
nps.mb.RecordNginxCacheBytesReadDataPoint(
921921
now,
922922
int64(cache.Bypass.Bytes),
923923
metadata.AttributeNginxCacheOutcomeBYPASS,
924924
name,
925925
)
926-
nps.mb.RecordNginxCacheBytesDataPoint(
926+
nps.mb.RecordNginxCacheBytesReadDataPoint(
927927
now,
928928
int64(cache.Expired.Bytes),
929929
metadata.AttributeNginxCacheOutcomeEXPIRED,
930930
name,
931931
)
932-
nps.mb.RecordNginxCacheBytesDataPoint(now, int64(cache.Hit.Bytes), metadata.AttributeNginxCacheOutcomeHIT, name)
933-
nps.mb.RecordNginxCacheBytesDataPoint(
932+
nps.mb.RecordNginxCacheBytesReadDataPoint(now, int64(cache.Hit.Bytes), metadata.AttributeNginxCacheOutcomeHIT, name)
933+
nps.mb.RecordNginxCacheBytesReadDataPoint(
934934
now,
935935
int64(cache.Miss.Bytes),
936936
metadata.AttributeNginxCacheOutcomeMISS,
937937
name,
938938
)
939-
nps.mb.RecordNginxCacheBytesDataPoint(
939+
nps.mb.RecordNginxCacheBytesReadDataPoint(
940940
now,
941941
int64(cache.Revalidated.Bytes),
942942
metadata.AttributeNginxCacheOutcomeREVALIDATED,
943943
name,
944944
)
945-
nps.mb.RecordNginxCacheBytesDataPoint(
945+
nps.mb.RecordNginxCacheBytesReadDataPoint(
946946
now,
947947
int64(cache.Stale.Bytes),
948948
metadata.AttributeNginxCacheOutcomeSTALE,
949949
name,
950950
)
951-
nps.mb.RecordNginxCacheBytesDataPoint(
951+
nps.mb.RecordNginxCacheBytesReadDataPoint(
952952
now,
953953
int64(cache.Updating.Bytes),
954954
metadata.AttributeNginxCacheOutcomeUPDATING,

internal/collector/nginxplusreceiver/testdata/expected.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ resourceMetrics:
300300
isMonotonic: true
301301
unit: requests
302302
- description: The total number of bytes read from the cache or proxied server.
303-
name: nginx.cache.bytes
303+
name: nginx.cache.bytes_read
304304
sum:
305305
aggregationTemporality: 2
306306
dataPoints:

0 commit comments

Comments
 (0)