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

Download, configure and launch collector #4

Merged
merged 5 commits into from
May 8, 2024
Merged

Conversation

jrothrock
Copy link
Contributor

@jrothrock jrothrock commented May 6, 2024

Adds the ability to download, configure and launch the otel-collector at Rails initialization.

This PR handles more of the happy path. Such as we are in a Rails environment (and not Sinatra for example), have access to the /tmp directory, can execute binaries within the /tmp directory, etc.

Additionally, due to brevity and the existing line count, additional and improved test coverage will occur in a separate PR.

@jrothrock jrothrock changed the title Download collector Download, configure and launch collector May 6, 2024
Base automatically changed from add-config to main May 7, 2024 14:51
@jrothrock jrothrock force-pushed the download-collector branch from 90f0ed6 to 9229bce Compare May 7, 2024 14:53
'collector_config_file' => '/tmp/scout_apm/config.yml',
'collector_version' => '0.99.0',
'monitored_logs' => [],
'logs_reporting_endpoint' => 'https://otlp.telemetryhub.com:4317'
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we'll want to create DNS for scoutapm.com, like otlp.scoutapm.com that we can still point at the TH ingest LB. Or whereever else we want. Obviously doesn't need to change now but just to say it out loud.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup agreed

extract_collector
end

# TODO: Re-evaluate this?
Copy link
Contributor

Choose a reason for hiding this comment

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

What about it would you like to evaluate? This seems reasonable. Would you consider trying to package the collector binary into the gem? I feel like that is another option... I've seen worse.

Copy link
Contributor Author

@jrothrock jrothrock May 7, 2024

Choose a reason for hiding this comment

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

Ah sorry, I didn't clarify this much. This is in regards to the Assignment Branch Condition size and Rubocop

# rubocop:disable Metrics/AbcSize for the method

@lancetarn lancetarn linked an issue May 8, 2024 that may be closed by this pull request
@jrothrock jrothrock merged commit adbc2b9 into main May 8, 2024
12 checks passed
@jrothrock jrothrock deleted the download-collector branch May 8, 2024 19:13
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.

Download, Configure and Launch Collector
2 participants