Skip to content

Commit

Permalink
add project
Browse files Browse the repository at this point in the history
  • Loading branch information
qiansheng91 committed Aug 3, 2021
1 parent 398cd9b commit e4a1063
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sls_store/sls_storage_plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func NewSLSStorageForJaegerPlugin(endpoint string, accessKeyID string, accessSec
accessKeyID: accessKeyID,
accessSecret: accessSecret,
project: project,
instance: newSlsTraceInstance(instance),
instance: newSlsTraceInstance(project, instance),
maxLookBack: maxLookBack,
}
}
Expand Down
9 changes: 8 additions & 1 deletion sls_store/sls_trace_instance.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package sls_store

type slsTraceInstance interface {
project() string
traceLogStore() string
serviceDependencyLogStore() string
}

func newSlsTraceInstance(instance string) slsTraceInstance {
func newSlsTraceInstance(project, instance string) slsTraceInstance {
return &slsTraceInstanceImpl{
projectName: project,
instance: instance,
traceLogStoreName: instance + "-traces",
serviceDependencyLogStoreName: instance + "-traces-deps",
Expand All @@ -17,6 +19,11 @@ type slsTraceInstanceImpl struct {
instance string
traceLogStoreName string
serviceDependencyLogStoreName string
projectName string
}

func (s *slsTraceInstanceImpl) project() string {
return s.projectName
}

func (s *slsTraceInstanceImpl) traceLogStore() string {
Expand Down

0 comments on commit e4a1063

Please sign in to comment.