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

PYD-1399: Add environments documentation #591

Merged
merged 22 commits into from
Nov 14, 2024

Conversation

ChristopherGS
Copy link
Contributor

@ChristopherGS ChristopherGS commented Nov 13, 2024

Documents the environment feature

Edit by Marcelo:

Copy link

linear bot commented Nov 13, 2024

Copy link
Contributor

@hyperlint-ai hyperlint-ai bot left a comment

Choose a reason for hiding this comment

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

2 files reviewed, 2 total issue(s) found.

The style guide flagged several spelling errors that seemed like false positives. We skipped posting inline suggestions for the following words:

  • [Dd]ev

docs/guides/advanced/using-environments.md Outdated Show resolved Hide resolved
docs/guides/advanced/using-environments.md Outdated Show resolved Hide resolved

Note that by default there are system generated environments:

- `all envs`: Searches will include all spans with any environment set
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Kludex is this description of all_envs vs. not specified correct, I wasn't sure. Could it be that not specified just returns everything?

Copy link
Member

Choose a reason for hiding this comment

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

I don't know... I was not involved in this decision. 🤷‍♂️

It makes sense for all envs to include not specified, but I don't know how it was implemented.

Choose a reason for hiding this comment

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

All envs has no limitations,

Choose a reason for hiding this comment

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

not specified returns logs with empty env value

Co-authored-by: hyperlint-ai[bot] <154288675+hyperlint-ai[bot]@users.noreply.github.com>
Copy link

cloudflare-workers-and-pages bot commented Nov 13, 2024

Deploying logfire-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 9de9e92
Status: ✅  Deploy successful!
Preview URL: https://f004cbed.logfire-docs.pages.dev
Branch Preview URL: https://cs-docs-environments-feature.logfire-docs.pages.dev

View logs

Copy link

codecov bot commented Nov 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (a316c91) to head (9de9e92).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #591   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          133       133           
  Lines        10452     10452           
  Branches      1431      1431           
=========================================
  Hits         10452     10452           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ChristopherGS
Copy link
Contributor Author

Not sure what's going on with the build

Comment on lines 35 to 40
## Can I Create an Environment in the UI?
No, you cannot create or delete set environments via the UI, instead use the SDK.
Copy link
Member

Choose a reason for hiding this comment

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

I wouldn't include unnecessary information. 👀

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Disagree, I think it's worth being explicit about this so people don't try and find it. There is very little downside to clarifying it.

mkdocs.yml Outdated Show resolved Hide resolved
@Kludex
Copy link
Member

Kludex commented Nov 13, 2024

Not sure what's going on with the build

WARNING - Doc file 'guides/advanced/using-environments.md' contains an unrecognized relative link 'docs/reference/organization-structure/', it was left as is.

ChristopherGS and others added 5 commits November 13, 2024 16:29
Co-authored-by: hyperlint-ai[bot] <154288675+hyperlint-ai[bot]@users.noreply.github.com>
@Kludex Kludex force-pushed the cs/docs-environments-feature branch 2 times, most recently from 2b17337 to 27720bc Compare November 14, 2024 09:33
ChristopherGS and others added 6 commits November 14, 2024 10:33
Co-authored-by: hyperlint-ai[bot] <154288675+hyperlint-ai[bot]@users.noreply.github.com>
Co-authored-by: hyperlint-ai[bot] <154288675+hyperlint-ai[bot]@users.noreply.github.com>
@Kludex Kludex force-pushed the cs/docs-environments-feature branch from 27720bc to 125f27c Compare November 14, 2024 09:33
Copy link
Contributor

@hyperlint-ai hyperlint-ai bot left a comment

Choose a reason for hiding this comment

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

2 files reviewed, 3 total issue(s) found.

@@ -0,0 +1,54 @@
As a developer, we find ourselves working on differents environments for a project: local, production, sometimes staging, and depending on your company deployment strategy... You can have even more! 😅
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
As a developer, we find ourselves working on differents environments for a project: local, production, sometimes staging, and depending on your company deployment strategy... You can have even more! 😅
As a developer, we find ourselves working on different environments for a project: local, production, sometimes staging, and depending on your company deployment strategy... You can have even more! 😅

Issues:

  • Style Guide - (Spelling-error) Did you really mean 'differents'?

Fix Explanation:

The word 'differents' is a spelling mistake. It should be 'different' to correctly match the context of the sentence.

As a developer, we find ourselves working on differents environments for a project: local, production, sometimes staging, and depending on your company deployment strategy... You can have even more! 😅

With **Logfire** you can distinguish which environment you are sending data to.
You just need to set the the [`environment` parameter on the `logfire.configure`][logfire.configure(environment)].
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
You just need to set the the [`environment` parameter on the `logfire.configure`][logfire.configure(environment)].
You just need to set the [`environment` parameter on the `logfire.configure`][logfire.configure(environment)].

Issues:

  • Style Guide - (hyperlint.repeatedWords-error) 'the' is repeated, did you mean to repeat this word?
  • Style Guide - (Repetition-error) 'the' is repeated!

Fix Explanation:

The word 'the' is repeated unnecessarily. Removing the extra 'the' resolves the issue and improves the readability of the sentence.


logfire.configure(environment='local') # (1)!
```
1. Usually you are retriving the environment information from an environment variable.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
1. Usually you are retriving the environment information from an environment variable.
1. Usually you are retrieving the environment information from an environment variable.

Issues:

  • Style Guide - (Spelling-error) Did you really mean 'retriving'?

Fix Explanation:

The word 'retriving' is a common misspelling of 'retrieving'. Correcting this spelling error improves the professionalism and clarity of the documentation.

@ChristopherGS ChristopherGS merged commit 8447fdf into main Nov 14, 2024
21 checks passed
@ChristopherGS ChristopherGS deleted the cs/docs-environments-feature branch November 14, 2024 10:16
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.

Different environments for the same project (dev, prod, staging, custom)
3 participants