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

fix(otel receiver): Rename varnish attribute #305

Merged
merged 5 commits into from
Mar 22, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions receiver/varnishreceiver/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ These are the metrics available for this scraper.
| **varnish.backend.connections.count** | The backend connection type count. | {connections} | Sum(Int) | <ul> <li>backend_connection_type</li> </ul> |
| **varnish.backend.requests.count** | The backend requests count. | {requests} | Sum(Int) | <ul> </ul> |
| **varnish.cache.operations.count** | The cache operation type count. | {operations} | Sum(Int) | <ul> <li>cache_operations</li> </ul> |
| **varnish.client.requests.count** | The client request count. | {requests} | Sum(Int) | <ul> <li>client_requests</li> </ul> |
| **varnish.client.requests.count** | The client request count. | {requests} | Sum(Int) | <ul> <li>state</li> </ul> |
| **varnish.object.count** | The HTTP objects in the cache count. | {objects} | Sum(Int) | <ul> </ul> |
| **varnish.object.expired.count** | The expired objects from old age count. | {objects} | Sum(Int) | <ul> </ul> |
| **varnish.object.moved.count** | The moved operations done on the LRU list count. | {objects} | Sum(Int) | <ul> </ul> |
Expand All @@ -35,6 +35,6 @@ metrics:
| backend_connection_type | The backend connection types. |
| cache_name | The varnish cache name. |
| cache_operations | The cache operation types |
| client_requests | The client request types. |
| session_type | The session connection types. |
| state | The client request states. |
| thread_operations | The thread operation types. |

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions receiver/varnishreceiver/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ attributes:
value: kind
description: The session connection types.
enum: [accepted, dropped, failed]
client_requests:
value: kind
description: The client request types.
state:
value: state
description: The client request states.
enum: [received, dropped]

metrics:
Expand Down Expand Up @@ -105,7 +105,7 @@ metrics:
value_type: int
monotonic: true
aggregation: cumulative
attributes: [client_requests]
attributes: [state]
varnish.backend.requests.count:
enabled: true
description: The backend requests count.
Expand Down
4 changes: 2 additions & 2 deletions receiver/varnishreceiver/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ func (v *varnishScraper) recordVarnishSessionCountDataPoint(now pdata.Timestamp,

func (v *varnishScraper) recordVarnishClientRequestsCountDataPoint(now pdata.Timestamp, stats *Stats) {
attributeMappings := map[string]int64{
metadata.AttributeClientRequests.Received: stats.MAINClientReq.Value,
metadata.AttributeClientRequests.Dropped: stats.MAINReqDropped.Value,
metadata.AttributeState.Received: stats.MAINClientReq.Value,
metadata.AttributeState.Dropped: stats.MAINReqDropped.Value,
}

for attributeName, attributeValue := range attributeMappings {
Expand Down
Loading