Skip to content
This repository has been archived by the owner on May 6, 2022. It is now read-only.

Commit

Permalink
disable dist trace
Browse files Browse the repository at this point in the history
  • Loading branch information
srinandan committed Jul 3, 2021
1 parent 5dee6f7 commit aa717c5
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions cmd/env/disabletracecfg.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package env

import (
"github.com/spf13/cobra"
"github.com/srinandan/apigeecli/apiclient"
environments "github.com/srinandan/apigeecli/client/env"
)

//DisableTraceConfigCmd to manage tracing of apis
var DisableTraceConfigCmd = &cobra.Command{
Use: "disable",
Short: "Disable Distributed Trace config for the environment",
Long: "Disable Distributed Trace config for the environment",
Args: func(cmd *cobra.Command, args []string) (err error) {
apiclient.SetApigeeEnv(environment)
return apiclient.SetApigeeOrg(org)
},
RunE: func(cmd *cobra.Command, args []string) (err error) {
_, err = environments.DisableTraceConfig()
return
},
}

0 comments on commit aa717c5

Please sign in to comment.