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

Update Querying API docs based on additional feedback on #405 #410

Merged
merged 2 commits into from
Sep 27, 2024

Conversation

dmontagu
Copy link
Contributor

Address Samuel's feedback on #405.

I'll note that I am fairly confident the Accept header is not required, but the default value sent by requests and various other tools is or contains */*; I have a PR open on the platform in order to send JSON when the Accept header contains this.

@dmontagu dmontagu changed the title Update based on feedback Update Querying API docs based on additional feedback on #405 Aug 30, 2024
Copy link

cloudflare-workers-and-pages bot commented Sep 2, 2024

Deploying logfire-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7b6d6fc
Status: ✅  Deploy successful!
Preview URL: https://4820e797.logfire-docs.pages.dev
Branch Preview URL: https://dmontagu-address-samuel-feed.logfire-docs.pages.dev

View logs

@@ -79,7 +79,7 @@ Here's an example of how to use these clients:
# Retrieve data in arrow format, and load into a polars DataFrame
# Note that JSON columns such as `attributes` will be returned as
# JSON-serialized strings
df_from_arrow = pl.from_arrow(await client.query_arrow(sql=query))
df_from_arrow = pl.from_arrow(await client.query_arrow(sql=query)) # type: ignore
Copy link
Contributor

Choose a reason for hiding this comment

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

# type: ignore in docs????

- **`limit`**: An optional parameter to limit the number of rows returned by the query. If not specified, **the default limit is 500**. The maximum allowed value is 10,000.
- **`row_oriented`**: Only affects JSON responses. If set to `true`, the JSON response will be row-oriented; otherwise, it will be column-oriented.
- **`sql`**: The SQL query to execute. This is the only required query parameter.
- **`min_timestamp`**: An optional ISO-format timestamp to filter records with `start_timestamp` greater than this value for the `records` table or `recorded_timestamp` greater than this value for the `metrics` table. The same filtering can also be done manually within the query itself.
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this now have a default that should be documented?

@@ -197,22 +194,21 @@ else:

### Additional Configuration

The Logfire API supports various query parameters and response formats to give you flexibility in how you retrieve your data:
The Logfire API supports various response formats and query parameters to give you flexibility in how you retrieve your data:

- **Response Format**: Use the `Accept` header to specify the response format. Supported values include:
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 think multiple levels of bullet point work in mkdocs by default.

Copy link
Contributor

Choose a reason for hiding this comment

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

'Authorization': f'Bearer {read_token}',
'Content-Type': 'application/json'
}
headers = {'Authorization': f'Bearer {read_token}'}
Copy link
Member

Choose a reason for hiding this comment

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

Are you sure we don't need the Accept header?

@dmontagu dmontagu force-pushed the dmontagu/address-samuel-feedback branch from d8fd6e1 to 943b604 Compare September 27, 2024 16:10
Copy link

codecov bot commented Sep 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (ae8b151) to head (7b6d6fc).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #410   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          131       131           
  Lines         9782      9782           
  Branches      1289      1289           
=========================================
  Hits          9782      9782           

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

@@ -197,22 +194,21 @@ else:

### Additional Configuration

The Logfire API supports various query parameters and response formats to give you flexibility in how you retrieve your data:
The Logfire API supports various response formats and query parameters to give you flexibility in how you retrieve your data:
Copy link
Contributor

Choose a reason for hiding this comment

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

why were these swapped lol

Copy link
Contributor Author

Choose a reason for hiding this comment

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

to match the order the bullets occur below

@dmontagu dmontagu force-pushed the dmontagu/address-samuel-feedback branch from 4b6a121 to 7b6d6fc Compare September 27, 2024 16:55
@dmontagu dmontagu enabled auto-merge (squash) September 27, 2024 16:56
@dmontagu dmontagu merged commit 5ae8b34 into main Sep 27, 2024
13 checks passed
@dmontagu dmontagu deleted the dmontagu/address-samuel-feedback branch September 27, 2024 16:58
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