Skip to content

[Bug] sampling rate of dynamic configuration using DCS does not work #13836

@ranxuxin001

Description

@ranxuxin001

Search before asking

  • I had searched in the issues and found no similar issues.

Apache SkyWalking Component

OAP server (apache/skywalking)

What happened

Hello,

I've written the call() function of my grpc server to configure sampling rate. Oap log shows it calls call() function and parse the sampling rate correctly. But skywalking ui shows the same trace frequecy.

What you expected to happen

the sampling rate dynamic configuration works via grpc.

How to reproduce

My yaml configuration shows below:

const agentConfigurationYAML = `default:
  rate: 10000
  duration: -1
services:
  - name: qewqw-test::myapmmysqlservice
    rate: 100
    duration: -1`

func GetFromMysql() string {
	//query mysql to get configuration.
	return agentConfigurationYAML
}

func (s *configServer) Call(ctx context.Context, req *pb.ConfigurationRequest) (*pb.ConfigurationResponse, error) {
	configValue := GetFromMysql()
	log.Println("config value: ", configValue)
	cfgTb := []*pb.Config{
		{
			Name: "agent-analyzer.default.traceSamplingPolicy",
			Value: configValue,
		},

.....

        response := &pb.ConfigurationResponse{
		ConfigTable: cfgTb,
		Uuid:        s.currentUUID,
	}

	fmt.Printf("single. will send response to oap. %v", response.ConfigTable)
	return response, nil
}

Anything else

No response

Are you willing to submit a pull request to fix on your own?

  • Yes I am willing to submit a pull request on my own!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working and you are sure it's a bug!

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions