Skip to content

Commit

Permalink
Merge pull request #95 from solarwinds/NH-81286-only-default-setting
Browse files Browse the repository at this point in the history
NH-81286 Remove TypeLayer and SampleSourceLayer
  • Loading branch information
tammy-baylis-swi authored May 29, 2024
2 parents 0178a69 + 7feac20 commit 9759b88
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions internal/oboe/oboe.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ const (
SampleSourceNone
SampleSourceFile
SampleSourceDefault
SampleSourceLayer
)

type Oboe interface {
Expand Down Expand Up @@ -272,7 +271,7 @@ func (o *oboe) GetSetting() (*settings, bool) {
o.RLock()
defer o.RUnlock()

// for now only look up the default settings
// always use the default setting
key := settingKey{
sType: TypeDefault,
layer: "",
Expand All @@ -288,6 +287,7 @@ func (o *oboe) RemoveSetting() {
o.Lock()
defer o.Unlock()

// always use the default setting
key := settingKey{
sType: TypeDefault,
layer: "",
Expand Down
8 changes: 3 additions & 5 deletions internal/oboe/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@
package oboe

import (
"time"

"github.com/solarwinds/apm-go/internal/config"
"github.com/solarwinds/apm-go/internal/log"
"time"
)

type settings struct {
Expand Down Expand Up @@ -132,8 +133,7 @@ type settingFlag uint16

// setting types
const (
TypeDefault settingType = iota // default setting which serves as a fallback if no other settings found
TypeLayer // layer specific settings
TypeDefault settingType = iota // default setting and the only accepted setting
)

// setting flags offset
Expand Down Expand Up @@ -174,8 +174,6 @@ func (st settingType) toSampleSource() SampleSource {
switch st {
case TypeDefault:
source = SampleSourceDefault
case TypeLayer:
source = SampleSourceLayer
default:
source = SampleSourceNone
}
Expand Down

0 comments on commit 9759b88

Please sign in to comment.