Skip to content

Commit

Permalink
Rename LogEmbeddedMetric to just Metric
Browse files Browse the repository at this point in the history
  • Loading branch information
cluttrdev committed Feb 19, 2024
1 parent 14441bb commit 7f50ade
Show file tree
Hide file tree
Showing 15 changed files with 178 additions and 182 deletions.
8 changes: 4 additions & 4 deletions cmd/export_pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ func (c *ExportPipelineConfig) Exec(ctx context.Context, args []string) error {
ProjectID: projectID,
PipelineID: pipelineID,

ExportSections: c.exportSections,
ExportTestReports: c.exportTestReports,
ExportTraces: c.exportTraces,
ExportLogEmbeddedMetrics: c.exportMetrics,
ExportSections: c.exportSections,
ExportTestReports: c.exportTestReports,
ExportTraces: c.exportTraces,
ExportMetrics: c.exportMetrics,
}

return tasks.ExportPipelineHierarchy(ctx, gitlabclient, exp, opts)
Expand Down
6 changes: 3 additions & 3 deletions grpc/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,13 @@ func RecordTestCases(c *Client, ctx context.Context, data []*pb.TestCase) error
return send[pb.TestCase](stream, data)
}

func RecordLogEmbeddedMetrics(c *Client, ctx context.Context, data []*pb.LogEmbeddedMetric) error {
stream, err := c.client.RecordLogEmbeddedMetrics(ctx)
func RecordMetrics(c *Client, ctx context.Context, data []*pb.Metric) error {
stream, err := c.client.RecordMetrics(ctx)
if err != nil {
return err
}

return send[pb.LogEmbeddedMetric](stream, data)
return send[pb.Metric](stream, data)
}

func RecordTraces(c *Client, ctx context.Context, data []*pb.Trace) error {
Expand Down
152 changes: 75 additions & 77 deletions grpc/exporterpb/metric.pb.go

Large diffs are not rendered by default.

58 changes: 28 additions & 30 deletions grpc/exporterpb/service.pb.go

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

62 changes: 31 additions & 31 deletions grpc/exporterpb/service_grpc.pb.go

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

10 changes: 5 additions & 5 deletions internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ type ProjectSettings struct {
}

type ProjectExport struct {
Sections ProjectExportSections `default:"{}" yaml:"sections"`
TestReports ProjectExportTestReports `default:"{}" yaml:"testreports"`
Traces ProjectExportTraces `default:"{}" yaml:"traces"`
LogEmbeddedMetrics ProjectExportLogEmbeddedMetrics `default:"{}" yaml:"log_embedded_metrics"`
Sections ProjectExportSections `default:"{}" yaml:"sections"`
TestReports ProjectExportTestReports `default:"{}" yaml:"testreports"`
Traces ProjectExportTraces `default:"{}" yaml:"traces"`
Metrics ProjectExportMetrics `default:"{}" yaml:"metrics"`
}

type ProjectExportSections struct {
Expand All @@ -59,7 +59,7 @@ type ProjectExportTraces struct {
Enabled bool `default:"true" yaml:"enabled"`
}

type ProjectExportLogEmbeddedMetrics struct {
type ProjectExportMetrics struct {
Enabled bool `default:"true" yaml:"enabled"`
}

Expand Down
4 changes: 2 additions & 2 deletions internal/exporter/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ func (e *Exporter) ExportTestCases(ctx context.Context, data []*pb.TestCase) err
return export[pb.TestCase](e, ctx, data, grpc_client.RecordTestCases)
}

func (e *Exporter) ExportLogEmbeddedMetrics(ctx context.Context, data []*pb.LogEmbeddedMetric) error {
return export[pb.LogEmbeddedMetric](e, ctx, data, grpc_client.RecordLogEmbeddedMetrics)
func (e *Exporter) ExportMetrics(ctx context.Context, data []*pb.Metric) error {
return export[pb.Metric](e, ctx, data, grpc_client.RecordMetrics)
}

func (e *Exporter) ExportTraces(ctx context.Context, data []*pb.Trace) error {
Expand Down
Loading

0 comments on commit 7f50ade

Please sign in to comment.