Skip to content

Commit

Permalink
[mdatagen] Fix documentation generated for optional metrics (open-tel…
Browse files Browse the repository at this point in the history
…emetry#16563)

Duplicated documentation for default metrics was generated in the Optional metrics section. This change fixes that
  • Loading branch information
dmitryax authored and shalper2 committed Dec 6, 2022
1 parent 12148fb commit 396e2f7
Show file tree
Hide file tree
Showing 40 changed files with 676 additions and 7,001 deletions.
2 changes: 1 addition & 1 deletion .chloggen/mdatagen-improve-documentation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ component: cmd/mdatagen
note: Improve generated documentation

# One or more tracking issues related to the change
issues: [16556]
issues: [16556, 16563]
9 changes: 7 additions & 2 deletions cmd/mdatagen/templates/documentation.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ metrics:
{{- end }}
{{- end }}

{{- $optionalMetricSeen := false }}
{{- range $metricName, $metric := .Metrics }}
{{- if not $metric.IsEnabled }}
{{- if not $optionalMetricSeen }}

## Optional Metrics

The following metrics are not emitted by default. Each of them can be enabled by applying the following configuration:
Expand All @@ -66,8 +71,8 @@ metrics:
enabled: true
```

{{- range $metricName, $metric := .Metrics }}
{{- if $metric.IsEnabled }}
{{- end }}
{{- $optionalMetricSeen = true }}

{{ template "metric-documenation" $metricName }}

Expand Down
204 changes: 0 additions & 204 deletions receiver/activedirectorydsreceiver/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,207 +205,3 @@ The number of threads in use by the directory service.
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic |
| ---- | ----------- | ---------- | ----------------------- | --------- |
| {threads} | Sum | Int | Cumulative | false |
## Optional Metrics
The following metrics are not emitted by default. Each of them can be enabled by applying the following configuration:
```yaml
metrics:
<metric_name>:
enabled: true
```
### active_directory.ds.bind.rate
The number of binds per second serviced by this domain controller.
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic |
| ---- | ----------- | ---------- | ----------------------- | --------- |
| {binds}/s | Sum | Double | Cumulative | false |
#### Attributes
| Name | Description | Values |
| ---- | ----------- | ------ |
| type | The type of bind to the domain server. | Str: ``server``, ``client`` |
### active_directory.ds.ldap.bind.last_successful.time
The amount of time taken for the last successful LDAP bind.
| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
| ms | Gauge | Int |
### active_directory.ds.ldap.bind.rate
The number of successful LDAP binds per second.
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic |
| ---- | ----------- | ---------- | ----------------------- | --------- |
| {binds}/s | Sum | Double | Cumulative | false |
### active_directory.ds.ldap.client.session.count
The number of connected LDAP client sessions.
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic |
| ---- | ----------- | ---------- | ----------------------- | --------- |
| {sessions} | Sum | Int | Cumulative | false |
### active_directory.ds.ldap.search.rate
The number of LDAP searches per second.
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic |
| ---- | ----------- | ---------- | ----------------------- | --------- |
| {searches}/s | Sum | Double | Cumulative | false |
### active_directory.ds.name_cache.hit_rate
The percentage of directory object name component lookups that are satisfied by the Directory System Agent's name cache.
| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
| % | Gauge | Double |
### active_directory.ds.notification.queued
The number of pending update notifications that have been queued to push to clients.
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic |
| ---- | ----------- | ---------- | ----------------------- | --------- |
| {notifications} | Sum | Int | Cumulative | false |
### active_directory.ds.operation.rate
The number of operations performed per second.
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic |
| ---- | ----------- | ---------- | ----------------------- | --------- |
| {operations}/s | Sum | Double | Cumulative | false |
#### Attributes
| Name | Description | Values |
| ---- | ----------- | ------ |
| type | The type of operation. | Str: ``read``, ``write``, ``search`` |
### active_directory.ds.replication.network.io
The amount of network data transmitted by the Directory Replication Agent.
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic |
| ---- | ----------- | ---------- | ----------------------- | --------- |
| By | Sum | Int | Cumulative | true |
#### Attributes
| Name | Description | Values |
| ---- | ----------- | ------ |
| direction | The direction of data flow. | Str: ``sent``, ``received`` |
| type | The type of network data sent. | Str: ``compressed``, ``uncompressed`` |
### active_directory.ds.replication.object.rate
The number of objects transmitted by the Directory Replication Agent per second.
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic |
| ---- | ----------- | ---------- | ----------------------- | --------- |
| {objects}/s | Sum | Double | Cumulative | false |
#### Attributes
| Name | Description | Values |
| ---- | ----------- | ------ |
| direction | The direction of data flow. | Str: ``sent``, ``received`` |
### active_directory.ds.replication.operation.pending
The number of pending replication operations for the Directory Replication Agent.
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic |
| ---- | ----------- | ---------- | ----------------------- | --------- |
| {operations} | Sum | Int | Cumulative | false |
### active_directory.ds.replication.property.rate
The number of properties transmitted by the Directory Replication Agent per second.
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic |
| ---- | ----------- | ---------- | ----------------------- | --------- |
| {properties}/s | Sum | Double | Cumulative | false |
#### Attributes
| Name | Description | Values |
| ---- | ----------- | ------ |
| direction | The direction of data flow. | Str: ``sent``, ``received`` |
### active_directory.ds.replication.sync.object.pending
The number of objects remaining until the full sync completes for the Directory Replication Agent.
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic |
| ---- | ----------- | ---------- | ----------------------- | --------- |
| {objects} | Sum | Int | Cumulative | false |
### active_directory.ds.replication.sync.request.count
The number of sync requests made by the Directory Replication Agent.
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic |
| ---- | ----------- | ---------- | ----------------------- | --------- |
| {requests} | Sum | Int | Cumulative | true |
#### Attributes
| Name | Description | Values |
| ---- | ----------- | ------ |
| result | The result status of the sync request. | Str: ``success``, ``schema_mismatch``, ``other`` |
### active_directory.ds.replication.value.rate
The number of values transmitted by the Directory Replication Agent per second.
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic |
| ---- | ----------- | ---------- | ----------------------- | --------- |
| {values}/s | Sum | Double | Cumulative | false |
#### Attributes
| Name | Description | Values |
| ---- | ----------- | ------ |
| direction | The direction of data flow. | Str: ``sent``, ``received`` |
| type | The type of value sent. | Str: ``distingushed_names``, ``other`` |
### active_directory.ds.security_descriptor_propagations_event.queued
The number of security descriptor propagation events that are queued for processing.
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic |
| ---- | ----------- | ---------- | ----------------------- | --------- |
| {events} | Sum | Int | Cumulative | false |
### active_directory.ds.suboperation.rate
The rate of sub-operations performed.
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic |
| ---- | ----------- | ---------- | ----------------------- | --------- |
| {suboperations}/s | Sum | Double | Cumulative | false |
#### Attributes
| Name | Description | Values |
| ---- | ----------- | ------ |
| type | The type of suboperation. | Str: ``security_descriptor_propagations_event``, ``search`` |
### active_directory.ds.thread.count
The number of threads in use by the directory service.
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic |
| ---- | ----------- | ---------- | ----------------------- | --------- |
| {threads} | Sum | Int | Cumulative | false |
Loading

0 comments on commit 396e2f7

Please sign in to comment.