Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactored instrumented for more consistent API with runnable. #22

Merged
merged 4 commits into from
Feb 16, 2022

Conversation

bwplotka
Copy link
Contributor

Signed-off-by: Bartlomiej Plotka bwplotka@gmail.com

Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
@matej-g matej-g self-requested a review February 16, 2022 11:58
@bwplotka
Copy link
Contributor Author

This does not work as expected:

	for _, t := range instr.MetricTargets() {
			scfg.ServiceDiscoveryConfig.StaticConfigs[0].Targets = append(scfg.ServiceDiscoveryConfig.StaticConfigs[0].Targets, map[model.LabelName]model.LabelValue{
				model.AddressLabel:     model.LabelValue(t.InternalEndpoint),
				model.SchemeLabel:      model.LabelValue(strings.ToLower(t.Scheme)),
				model.MetricsPathLabel: model.LabelValue(t.MetricPath),
			})
		}
		cfg.ScrapeConfigs = append(cfg.ScrapeConfigs, scfg)

Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
@bwplotka
Copy link
Contributor Author

Works, rdy to be merged.

@matej-g matej-g merged commit f0fdc32 into main Feb 16, 2022
@bwplotka bwplotka deleted the instrumented branch February 19, 2022 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants