-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set logfire OTEL scope to magentic (#298)
* Set logfire OTEL scope to magentic * Add TODOs for setting scope * Set logfire otel_scope to magentic * Add TODO for otel version
- Loading branch information
1 parent
c7cb858
commit 3cb8c59
Showing
6 changed files
with
9 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
import logging | ||
|
||
import logfire_api | ||
|
||
logger = logging.getLogger("magentic") | ||
# Set default log level to WARNING so INFO logs must be explicitly enabled | ||
if logger.level == logging.NOTSET: | ||
logger.setLevel(logging.WARNING) | ||
|
||
logfire = logfire_api.Logfire(otel_scope="magentic") # TODO: Pass version here too |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters