Skip to content

Commit

Permalink
[receiver/couchdb] Define metrics (#6878)
Browse files Browse the repository at this point in the history
* establish couchdb codebase
establish couchdb metadata metrics

add metadata metrics

update units

establish couchdb codebase

clean up names/format

add couchdbreceiver to verisons

remove host validation

fix nit

add check for default endpoint on CreateDefaultConfig

add missing receivers in versions

update versions end space

update metadata pr feedback

remove enum for http.method/status_code

add code gen experimental tag, failed, bug issue made

update metadata to include enable

* update changelog

* update metrics to value_type int

* update nit changes

* update metadata names

* add view attribute
  • Loading branch information
JonathanWamsley authored Jan 7, 2022
1 parent 6eb1561 commit 11d75ca
Show file tree
Hide file tree
Showing 7 changed files with 751 additions and 72 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

- `couchdbreceiver`: Add couchdb client (#6880)
- `elasticsearchreceiver`: Implement scraper client (#7019)
- `couchdbreceiver`: Add metadata metrics (#6878)
- `prometheusremotewriteexporter`: Handling Staleness flag from OTLP (#6679)
- `prometheusexporter`: Handling Staleness flag from OTLP (#6805)
- `prometheusreceiver`: Set OTLP no-data-present flag for stale scraped metrics. (#7043)
Expand Down
20 changes: 20 additions & 0 deletions receiver/couchdbreceiver/codegen.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

//go:build !windows
// +build !windows

//go:generate mdatagen --experimental-gen metadata.yaml

package couchdbreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/couchdbreceiver"
13 changes: 13 additions & 0 deletions receiver/couchdbreceiver/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,21 @@ These are the metrics available for this scraper.

| Name | Description | Unit | Type | Attributes |
| ---- | ----------- | ---- | ---- | ---------- |
| couchdb.average_request_time | The average duration of a served request. | ms | Gauge(Double) | <ul> </ul> |
| couchdb.database.open | The number of open databases. | {databases} | Sum(Int) | <ul> </ul> |
| couchdb.database.operations | The number of database operations. | {operations} | Sum(Int) | <ul> <li>operation</li> </ul> |
| couchdb.file_descriptor.open | The number of open file descriptors. | {files} | Sum(Int) | <ul> </ul> |
| couchdb.httpd.bulk_requests | The number of bulk requests. | {requests} | Sum(Int) | <ul> </ul> |
| couchdb.httpd.requests | The number of HTTP requests by method. | {requests} | Sum(Int) | <ul> <li>http.method</li> </ul> |
| couchdb.httpd.responses | The number of each HTTP status code. | {responses} | Sum(Int) | <ul> <li>http.status_code</li> </ul> |
| couchdb.httpd.views | The number of views read. | {views} | Sum(Int) | <ul> <li>view</li> </ul> |

## Attributes

| Name | Description |
| ---- | ----------- |
| couchdb.node.name | The name of the node. |
| http.method | An HTTP request method. |
| http.status_code | An HTTP status code. |
| operation | The operation type. |
| view | The view type. |
2 changes: 0 additions & 2 deletions receiver/couchdbreceiver/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@

package couchdbreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/couchdbreceiver"

//go:generate mdatagen metadata.yaml

import (
"context"
"time"
Expand Down
70 changes: 0 additions & 70 deletions receiver/couchdbreceiver/internal/metadata/generated_metrics.go

This file was deleted.

Loading

0 comments on commit 11d75ca

Please sign in to comment.