Skip to content

Commit 755ca06

Browse files
committed
Add more logging
1 parent b17e77d commit 755ca06

File tree

5 files changed

+37
-31
lines changed

5 files changed

+37
-31
lines changed

docs/proto/proto.md

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
- [AgentConnectStatus.StatusCode](#f5-nginx-agent-sdk-AgentConnectStatus-StatusCode)
1919
- [AgentLogging.Level](#f5-nginx-agent-sdk-AgentLogging-Level)
2020

21+
- [command_svc.proto](#command_svc-proto)
22+
- [Commander](#f5-nginx-agent-sdk-Commander)
23+
2124
- [command.proto](#command-proto)
2225
- [AgentActivityStatus](#f5-nginx-agent-sdk-AgentActivityStatus)
2326
- [ChunkedResourceChunk](#f5-nginx-agent-sdk-ChunkedResourceChunk)
@@ -39,9 +42,6 @@
3942
- [NginxConfigStatus.Status](#f5-nginx-agent-sdk-NginxConfigStatus-Status)
4043
- [UploadStatus.TransferStatus](#f5-nginx-agent-sdk-UploadStatus-TransferStatus)
4144

42-
- [command_svc.proto](#command_svc-proto)
43-
- [Commander](#f5-nginx-agent-sdk-Commander)
44-
4545
- [common.proto](#common-proto)
4646
- [CertificateDates](#f5-nginx-agent-sdk-CertificateDates)
4747
- [CertificateName](#f5-nginx-agent-sdk-CertificateName)
@@ -341,6 +341,34 @@ Log level enum
341341

342342

343343

344+
<a name="command_svc-proto"></a>
345+
<p align="right"><a href="#top">Top</a></p>
346+
347+
## command_svc.proto
348+
349+
350+
351+
352+
353+
354+
355+
356+
357+
<a name="f5-nginx-agent-sdk-Commander"></a>
358+
359+
### Commander
360+
Represents a service used to sent command messages between the management server and the agent.
361+
362+
| Method Name | Request Type | Response Type | Description |
363+
| ----------- | ------------ | ------------- | ------------|
364+
| CommandChannel | [Command](#f5-nginx-agent-sdk-Command) stream | [Command](#f5-nginx-agent-sdk-Command) stream | A Bidirectional streaming RPC established by the agent and is kept open |
365+
| Download | [DownloadRequest](#f5-nginx-agent-sdk-DownloadRequest) | [DataChunk](#f5-nginx-agent-sdk-DataChunk) stream | A streaming RPC established by the agent and is used to download resources associated with commands The download stream will be kept open for the duration of the data transfer and will be closed when its done. The transfer is a stream of chunks as follows: header -&gt; data chunk 1 -&gt; data chunk N. Each data chunk is of a size smaller than the maximum gRPC payload |
366+
| Upload | [DataChunk](#f5-nginx-agent-sdk-DataChunk) stream | [UploadStatus](#f5-nginx-agent-sdk-UploadStatus) | A streaming RPC established by the agent and is used to upload resources associated with commands |
367+
368+
369+
370+
371+
344372
<a name="command-proto"></a>
345373
<p align="right"><a href="#top">Top</a></p>
346374

@@ -652,34 +680,6 @@ Transfer status enum
652680

653681

654682

655-
<a name="command_svc-proto"></a>
656-
<p align="right"><a href="#top">Top</a></p>
657-
658-
## command_svc.proto
659-
660-
661-
662-
663-
664-
665-
666-
667-
668-
<a name="f5-nginx-agent-sdk-Commander"></a>
669-
670-
### Commander
671-
Represents a service used to sent command messages between the management server and the agent.
672-
673-
| Method Name | Request Type | Response Type | Description |
674-
| ----------- | ------------ | ------------- | ------------|
675-
| CommandChannel | [Command](#f5-nginx-agent-sdk-Command) stream | [Command](#f5-nginx-agent-sdk-Command) stream | A Bidirectional streaming RPC established by the agent and is kept open |
676-
| Download | [DownloadRequest](#f5-nginx-agent-sdk-DownloadRequest) | [DataChunk](#f5-nginx-agent-sdk-DataChunk) stream | A streaming RPC established by the agent and is used to download resources associated with commands The download stream will be kept open for the duration of the data transfer and will be closed when its done. The transfer is a stream of chunks as follows: header -&gt; data chunk 1 -&gt; data chunk N. Each data chunk is of a size smaller than the maximum gRPC payload |
677-
| Upload | [DataChunk](#f5-nginx-agent-sdk-DataChunk) stream | [UploadStatus](#f5-nginx-agent-sdk-UploadStatus) | A streaming RPC established by the agent and is used to upload resources associated with commands |
678-
679-
680-
681-
682-
683683
<a name="common-proto"></a>
684684
<p align="right"><a href="#top">Top</a></p>
685685

src/core/metrics/sources/common.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ type namedMetric struct {
3434
}
3535

3636
func (n *namedMetric) label(name string) string {
37+
log.Tracef("Creating label for namespace %s, group %s, name %s", n.namespace, n.group, name)
3738
if name == "" {
3839
return ""
3940
}

src/core/metrics/sources/nginx_access_log.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,8 @@ func (c *NginxAccessLog) logStats(ctx context.Context, logFile, logFormat string
361361
upstreamCounters["upstream.response.length"] = getAverageMetricValue(upstreamResponseLength)
362362
}
363363

364+
log.Tracef("%s log file: Converting httpCounters: %v", logFile, httpCounters)
365+
364366
c.group = "http"
365367
simpleMetrics := c.convertSamplesToSimpleMetrics(httpCounters)
366368

test/performance/vendor/github.com/nginx/agent/v2/src/core/metrics/sources/common.go

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

test/performance/vendor/github.com/nginx/agent/v2/src/core/metrics/sources/nginx_access_log.go

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

0 commit comments

Comments
 (0)