Skip to content

Commit

Permalink
Added feature command
Browse files Browse the repository at this point in the history
Signed-off-by: cs-308-2023 <[email protected]>
  • Loading branch information
ADI-ROXX committed Jan 15, 2025
1 parent 15c7217 commit 1844638
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 63 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ certs:

.PHONY: features
features:
go run ./cmd/jaeger help | go run ./cmd/features
go run ./cmd/jaeger/features

.PHONY: certs-dryrun
certs-dryrun:
Expand Down
62 changes: 0 additions & 62 deletions cmd/features/main.go

This file was deleted.

Binary file added cmd/jaeger/__debug_bin393376937
Binary file not shown.
53 changes: 53 additions & 0 deletions cmd/jaeger/features/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
// Copyright (c) 2023 The Jaeger Authors.
// SPDX-License-Identifier: Apache-2.0

package main

import (
"fmt"

"go.opentelemetry.io/collector/component"
"go.opentelemetry.io/collector/confmap"
"go.opentelemetry.io/collector/confmap/provider/envprovider"
"go.opentelemetry.io/collector/confmap/provider/fileprovider"
"go.opentelemetry.io/collector/confmap/provider/httpprovider"
"go.opentelemetry.io/collector/confmap/provider/httpsprovider"
"go.opentelemetry.io/collector/confmap/provider/yamlprovider"
"go.opentelemetry.io/collector/otelcol"

"github.com/jaegertracing/jaeger/cmd/jaeger/internal"
"github.com/jaegertracing/jaeger/pkg/version"
)






func main(){
info := component.BuildInfo{
Command: "jaeger",
Description: internal.GetDescription(),
Version: version.Get().GitVersion,
}

settings := otelcol.CollectorSettings{
BuildInfo: info,
Factories: internal.Components,
ConfigProviderSettings: otelcol.ConfigProviderSettings{
ResolverSettings: confmap.ResolverSettings{
ProviderFactories: []confmap.ProviderFactory{
envprovider.NewFactory(),
fileprovider.NewFactory(),
httpprovider.NewFactory(),
httpsprovider.NewFactory(),
yamlprovider.NewFactory(),
},
},
},
}

fmt.Println("\n"+internal.GetDescription())
fmt.Println("List of feature gate identifiers. Prefix with '-' to disable the feature. '+' or no prefix will enable the feature.\n")
otelcol.FeatureCommand(settings)
}
5 changes: 5 additions & 0 deletions cmd/jaeger/internal/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ var yamlAllInOne embed.FS

const description = "Jaeger backend v2"

func GetDescription() string {
return description
}


func Command() *cobra.Command {
info := component.BuildInfo{
Command: "jaeger",
Expand Down

0 comments on commit 1844638

Please sign in to comment.