Skip to content

Commit

Permalink
Rename httpd receiver to apache receiver (open-telemetry#6207)
Browse files Browse the repository at this point in the history
* Rename httpd receiver to apache receiver

* Fix copy paste issue

* Fix find replace issues

* Fix multimod verify task

* Add entry to changelog for httpd -> apache
  • Loading branch information
dehaansa committed Nov 11, 2021
1 parent d5a5a4d commit d20e7d0
Show file tree
Hide file tree
Showing 19 changed files with 118 additions and 114 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ processor/routingprocessor/ @open-telemetry/collector-c
processor/spanmetricsprocessor/ @open-telemetry/collector-contrib-approvers @albertteoh
processor/tailsamplingprocessor/ @open-telemetry/collector-contrib-approvers @jpkrohling

receiver/apachereceiver/ @open-telemetry/collector-contrib-approvers @djaglowski
receiver/awscontainerinsightreceiver/ @open-telemetry/collector-contrib-approvers @Aneurysm9 @pxaws
receiver/awsecscontainermetricsreceiver/ @open-telemetry/collector-contrib-approvers @kbrockhoff @anuraaga
receiver/awsxrayreceiver/ @open-telemetry/collector-contrib-approvers @kbrockhoff @anuraaga
Expand All @@ -81,7 +82,6 @@ receiver/cloudfoundryreceiver/ @open-telemetry/collector-c
receiver/collectdreceiver/ @open-telemetry/collector-contrib-approvers @owais
receiver/dockerstatsreceiver/ @open-telemetry/collector-contrib-approvers @rmfitzpatrick
receiver/dotnetdiagnosticsreceiver/ @open-telemetry/collector-contrib-approvers @pmcollins @davmason
receiver/httpdreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski
receiver/jmxreceiver/ @open-telemetry/collector-contrib-approvers @rmfitzpatrick
receiver/k8sclusterreceiver/ @open-telemetry/collector-contrib-approvers @asuresh4
receiver/k8seventsreceiver/ @open-telemetry/collector-contrib-approvers @dmitryax
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

## 🛑 Breaking changes 🛑

- `httpdreceiver` renamed to `apachereceiver` to match industry standards (#6207)

## 🧰 Bug fixes 🧰

- `datadogexporter` improve cumulative metrics reset detection using `StartTimestamp` (#6120)
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# HTTPd Receiver
# Apache Web Server Receiver

This receiver fetches stats from a Httpd server using the `server-status?auto` endpoint.
This receiver fetches stats from a Apache Web Server instance using the `server-status?auto` endpoint.

Supported pipeline types: `metrics`

> :construction: This receiver is in **BETA**. Configuration fields and metric data model are subject to change.
## Prerequisites

This receiver supports Apache httpd version 2.4+
This receiver supports Apache Web Server version 2.4+

### mod_status module

Expand All @@ -27,7 +27,7 @@ The following settings are optional:

```yaml
receivers:
httpd:
apache:
endpoint: "http:https://localhost:8080/server-status?auto"
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package httpdreceiver
package apachereceiver

import (
"fmt"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package httpdreceiver
package apachereceiver

import (
"testing"
Expand Down
26 changes: 26 additions & 0 deletions receiver/apachereceiver/documentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[comment]: <> (Code generated by mdatagen. DO NOT EDIT.)

# apachereceiver

## Metrics

These are the metrics available for this scraper.

| Name | Description | Unit | Type | Attributes |
| ---- | ----------- | ---- | ---- | ---------- |
| apache.current_connections | The number of active connections currently attached to the HTTP server. | connections | Sum | <ul> <li>server_name</li> </ul> |
| apache.requests | The number of requests serviced by the HTTP server per second. | 1 | Sum | <ul> <li>server_name</li> </ul> |
| apache.scoreboard | The number of connections in each state. The apache scoreboard is an encoded representation of the state of all the server's workers. This metric decodes the scoreboard and presents a count of workers in each state. Additional details can be found [here](https://support.cpanel.net/hc/en-us/articles/360052040234-Understanding-the-Apache-scoreboard).
| scoreboard | Sum | <ul>
<li>server_name</li> <li>scoreboard_state</li> </ul> |
| apache.traffic | Total HTTP server traffic. | By | Sum | <ul> <li>server_name</li> </ul> |
| apache.uptime | The amount of time that the server has been running in seconds. | s | Sum | <ul> <li>server_name</li> </ul> |
| apache.workers | The number of workers currently attached to the HTTP server. | connections | Sum | <ul> <li>server_name</li> <li>workers_state</li> </ul> |

## Attributes

| Name | Description |
| ---- | ----------- |
| scoreboard_state | The state of a connection. |
| server_name | The name of the Apache HTTP server. |
| workers_state | The state of workers. |
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package httpdreceiver
package apachereceiver

//go:generate mdatagen metadata.yaml

Expand All @@ -29,10 +29,10 @@ import (
)

const (
typeStr = "httpd"
typeStr = "apache"
)

// NewFactory creates a factory for httpd receiver.
// NewFactory creates a factory for apache receiver.
func NewFactory() component.ReceiverFactory {
return receiverhelper.NewFactory(
typeStr,
Expand Down Expand Up @@ -61,7 +61,7 @@ func createMetricsReceiver(
) (component.MetricsReceiver, error) {
cfg := rConf.(*Config)

ns := newHttpdScraper(params.Logger, cfg)
ns := newApacheScraper(params.Logger, cfg)
scraper, err := scraperhelper.NewScraper(typeStr, ns.scrape, scraperhelper.WithStart(ns.start))
if err != nil {
return nil, err
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package httpdreceiver
package apachereceiver

import (
"context"
Expand All @@ -28,7 +28,7 @@ import (
func TestType(t *testing.T) {
factory := NewFactory()
ft := factory.Type()
require.EqualValues(t, "httpd", ft)
require.EqualValues(t, "apache", ft)
}

func TestValidConfig(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/open-telemetry/opentelemetry-collector-contrib/receiver/httpdreceiver
module github.com/open-telemetry/opentelemetry-collector-contrib/receiver/apachereceiver

go 1.17

Expand Down
File renamed without changes.

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

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: httpdreceiver
name: apachereceiver

attributes:
server_name:
Expand Down Expand Up @@ -26,47 +26,47 @@ attributes:
- idle_cleanup

metrics:
httpd.uptime:
apache.uptime:
description: The amount of time that the server has been running in seconds.
unit: s
data:
type: sum
monotonic: true
aggregation: cumulative
attributes: [ server_name ]
httpd.current_connections:
apache.current_connections:
description: The number of active connections currently attached to the HTTP server.
unit: connections
data:
type: sum
monotonic: false
aggregation: cumulative
attributes: [ server_name ]
httpd.workers:
apache.workers:
description: The number of workers currently attached to the HTTP server.
unit: connections
data:
type: sum
monotonic: false
aggregation: cumulative
attributes: [ server_name, workers_state]
httpd.requests:
apache.requests:
description: The number of requests serviced by the HTTP server per second.
unit: 1
data:
type: sum
monotonic: true
aggregation: cumulative
attributes: [ server_name ]
httpd.traffic:
apache.traffic:
description: Total HTTP server traffic.
unit: By
data:
type: sum
monotonic: true
aggregation: cumulative
attributes: [ server_name ]
httpd.scoreboard:
apache.scoreboard:
description: The number of connections in each state.
extended_documentation: >
The apache scoreboard is an encoded representation of the state of all the server's workers.
Expand Down
Loading

0 comments on commit d20e7d0

Please sign in to comment.