Skip to content

Commit

Permalink
Merge branch 'main' into feat/agentctl_test_logs_inspect
Browse files Browse the repository at this point in the history
  • Loading branch information
fgouteroux authored Apr 9, 2024
2 parents 43038c1 + b354efc commit 4e5077f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
> **Deprecation notice**: Grafana Agent has been deprecated and is now in
> Long-Term Support mode. We recommend migrating to the new Grafana Alloy
> collector, which is built on the foundation of Grafana Agent Flow.
>
> For more information, read our blog posts about Alloy and how to easily
> migrate from Agent to Alloy:
>
> * [Alloy announcement blog post](https://grafana.com/blog/2024/04/09/grafana-alloy-opentelemetry-collector-with-prometheus-pipelines/)
> * [Alloy FAQ](https://grafana.com/blog/2024/04/09/grafana-agent-to-grafana-alloy-opentelemetry-collector-faq/)
> * [Migrate to Alloy](https://grafana.com/docs/alloy/latest/tasks/migrate/)
<p align="center"><img src="docs/sources/assets/logo_and_name.png" alt="Grafana Agent logo"></p>

Grafana Agent is an OpenTelemetry Collector distribution with configuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ func TestReadLogFile(t *testing.T) {
err := common.FetchDataFromURL(query, &logResponse)
assert.NoError(c, err)
if assert.NotEmpty(c, logResponse.Data.Result) {
assert.Equal(c, logResponse.Data.Result[0].Stream["filename"], "logs.txt")
logs := make([]string, len(logResponse.Data.Result[0].Values))
for i, valuePair := range logResponse.Data.Result[0].Values {
logs[i] = valuePair[1]
logs := make([]string, 0)
for _, result := range logResponse.Data.Result {
assert.Equal(c, result.Stream["filename"], "logs.txt")
for _, valuePair := range result.Values {
logs = append(logs, valuePair[1])
}
}
assert.Contains(c, logs, "[2023-10-02 14:25:43] INFO: Starting the web application...")
}
Expand Down

0 comments on commit 4e5077f

Please sign in to comment.