Skip to content
This repository has been archived by the owner on Dec 26, 2022. It is now read-only.

Lightstep dev mode #1956

Merged
6 commits merged into from
Sep 6, 2022
Merged

Lightstep dev mode #1956

6 commits merged into from
Sep 6, 2022

Conversation

ghost
Copy link

@ghost ghost commented Sep 6, 2022

Which issue does this PR correspond to?

Fixes https://github.com/grapl-security/issue-tracker/issues/1010

What changes does this PR make to Grapl? Why?

This adds the ability to run Lightstep in dev mode and get data into Lightstep

How were these changes tested?

Run the Lightstep docker container using the command from Lightstep
make up,
Check that data makes it into the dev panel afterward

@ghost ghost self-assigned this Sep 6, 2022
Dev satellites should always be localhost. This also primes the way
to use private satellites
The lightstep dev container doesn't have a TLS endpoint by default. As
such, the quickest way to get this working is to allow insecure
transmission to the local container.
Lng-term we should figure out how to get TLS active for this workflow
@ghost ghost force-pushed the twunderlich/lightstep-dev-mode branch from ecb64ee to f556e81 Compare September 6, 2022 14:45
Comment on lines 37 to 41
# use the endpoint as a way to figure out if we're in local dev or not
if lightstep_endpoint == "ingest.lightstep.com:443":
is_endpoint_insecure = "false"
else:
is_endpoint_insecure = "true"
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess I'm a bit confused here - do we actually care about local or not, or just if it's 443 (secure) or 80 (insecure)?

Copy link
Contributor

Choose a reason for hiding this comment

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

If everything is going to the real Lightstep, do we have things namespaced or organized in such a way that we'll be able to differentiate traces from say, one engineer running tests locally and CI running tests in verify vs. in our staging environment?

Copy link
Author

Choose a reason for hiding this comment

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

Just whether it's secure or not. I think I may switch this to just be passed in as a config instead.

Copy link
Author

Choose a reason for hiding this comment

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

@christophermaier,
For devs, yes that should be specific to each engineer.
For the others, not yet. Right now everything should be staging. It looks like the right way to handle this is to have separate api keys, but I still need to finish testing that.

@ghost ghost force-pushed the twunderlich/lightstep-dev-mode branch from f556e81 to 297b406 Compare September 6, 2022 15:16
@ghost ghost force-pushed the twunderlich/lightstep-dev-mode branch from 478ba07 to 816963e Compare September 6, 2022 16:15
@codecov
Copy link

codecov bot commented Sep 6, 2022

Codecov Report

Base: 40.96% // Head: 40.95% // Decreases project coverage by -0.00% ⚠️

Coverage data is based on head (816963e) compared to base (0e08708).
Patch coverage: 0.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1956      +/-   ##
==========================================
- Coverage   40.96%   40.95%   -0.01%     
==========================================
  Files         467      467              
  Lines       12562    12564       +2     
  Branches       23       23              
==========================================
  Hits         5146     5146              
- Misses       7401     7403       +2     
  Partials       15       15              
Impacted Files Coverage Δ
pulumi/grapl/__main__.py 0.00% <0.00%> (ø)
pulumi/infra/observability_env_vars.py 0.00% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@ghost ghost changed the title Twunderlich/lightstep dev mode Lightstep dev mode Sep 6, 2022
@ghost ghost merged commit 0048c98 into main Sep 6, 2022
@ghost ghost deleted the twunderlich/lightstep-dev-mode branch September 6, 2022 17:14
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants