Skip to content

Add automatic scrubbing for tracing#615

Merged
albertvaka merged 1 commit intomasterfrom
albertvaka/apm-obfuscation
Mar 24, 2020
Merged

Add automatic scrubbing for tracing#615
albertvaka merged 1 commit intomasterfrom
albertvaka/apm-obfuscation

Conversation

@albertvaka
Copy link
Copy Markdown
Contributor

Rebase of #560

Copy link
Copy Markdown

@gbbr gbbr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have enough Ruby knowledge, but I'd say this looks good. The main idea is to make sure all options work, which are in the docs here: https://docs.datadoghq.com/tracing/guide/agent-obfuscation.

I think I'd feel more comfortable if the tests would be more thorough and actually verify that the full object gets translated into the file, not just a few options.

Copy link
Copy Markdown
Member

@truthbk truthbk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just a minor nit.

}
end

context 'with apm_enabled set to true and apm_obfuscation specified' do
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: we're missing a similar test for A5 to test the ini-style file generation (the conf footers), you might feel free to ignore, but just pointing it out.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't pass this config to A5 at all, so there should be no change for A5. These settings end up in $agent_config which is only used when generating A6/7 config.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then why have changes to templates/datadog_apm_footer.conf.erb at all? I guess we can remove that, that's for A5 config.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My bad, it is used by that template. I'll add a test.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually the template is not working since the nested objects aren't output in ini format. I'm just going to remove it and not support this on A5, which I think is reasonable.

@albertvaka albertvaka force-pushed the albertvaka/apm-obfuscation branch from dea484e to f03f48e Compare March 24, 2020 15:35
@albertvaka albertvaka requested a review from a team as a code owner March 24, 2020 15:35
@albertvaka albertvaka merged commit 64258c2 into master Mar 24, 2020
@albertvaka albertvaka deleted the albertvaka/apm-obfuscation branch March 24, 2020 16:46
cegeka-jenkins pushed a commit to cegeka/puppet-datadog_agent that referenced this pull request Apr 6, 2020
Co-authored-by: Jamie van Brunschot <j.vanbrunschot@coolblue.nl>
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.

3 participants