-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using new otlpfile pipeline for self metrics #1922
base: master
Are you sure you want to change the base?
Changes from all commits
843a16f
3c459b2
7a90e76
6b5aedb
cf393d6
9ccd96c
4cf50d9
ed7ee16
3f788ef
730e968
0fff72d
edfeac6
238c4a6
88e0c05
2b0476b
5657c66
5efb332
e440609
7cae18f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,20 +24,19 @@ import ( | |
"syscall" | ||
|
||
"github.com/GoogleCloudPlatform/ops-agent/cmd/google_cloud_ops_agent_diagnostics/utils" | ||
"github.com/GoogleCloudPlatform/ops-agent/internal/self_metrics" | ||
) | ||
|
||
var ( | ||
config = flag.String("config", "/etc/google-cloud-ops-agent/config.yaml", "path to the user specified agent config") | ||
) | ||
|
||
func run(ctx context.Context) error { | ||
userUc, mergedUc, err := utils.GetUserAndMergedConfigs(ctx, *config) | ||
_, _, err := utils.GetUserAndMergedConfigs(ctx, *config) | ||
if err != nil { | ||
return err | ||
} | ||
|
||
ctx, cancel := context.WithCancel(ctx) | ||
_, cancel := context.WithCancel(ctx) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need this anymore then? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This all will go away on the next PR that removes the diagnostics binary. I'm trying to change the least i can and maintain functionality to make it easier to review. |
||
defer cancel() | ||
|
||
go func() { | ||
|
@@ -54,10 +53,5 @@ func run(ctx context.Context) error { | |
} | ||
}() | ||
|
||
err = self_metrics.CollectOpsAgentSelfMetrics(ctx, userUc, mergedUc) | ||
if err != nil { | ||
return err | ||
} | ||
|
||
return nil | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,7 +59,7 @@ func (uc *UnifiedConfig) GenerateFilesFromConfig(ctx context.Context, service, l | |
} | ||
} | ||
case "otel": | ||
otelConfig, err := uc.GenerateOtelConfig(ctx) | ||
otelConfig, err := uc.GenerateOtelConfig(ctx, outDir) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [nit] In the fluent bit case, the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can do on a follow up There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, we don't write the otel generated configs inside In the PR, @rafaelwestphal is passing |
||
if err != nil { | ||
return fmt.Errorf("can't parse configuration: %w", err) | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method can just return an err now. We don't ever use the first 2 return values I don't think
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This all will go away on the next PR that removes the diagnostics binary. I'm trying to change the least i can and maintain functionality to make it easier to review.