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

[OPIK-797] Implement get log API #1079

Closed
wants to merge 28 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
755d147
OPIK-795: Create rule logs table
thiagohora Jan 16, 2025
9fa8f0b
OPIK-796: Implement clickhouse user facing logs
thiagohora Jan 16, 2025
e28974e
Address PR review
thiagohora Jan 17, 2025
e6863eb
OPIK-795: Create rule logs table
thiagohora Jan 16, 2025
8b5b7a5
Merge branch 'thiagohora/OPIK-795_create_rule_log_table' into thiagoh…
thiagohora Jan 17, 2025
6ab6a14
Fix file name and column name
thiagohora Jan 17, 2025
249d384
Fix tests
thiagohora Jan 17, 2025
69fc3e3
Change table sortable key
thiagohora Jan 17, 2025
f3ac125
Merge branch 'thiagohora/OPIK-795_create_rule_log_table' into thiagoh…
thiagohora Jan 17, 2025
22feff1
Fix marker field ingestion
thiagohora Jan 17, 2025
cd06f0e
Merge branch 'thiagohora/OPIK-796_implement_clickhouse_user_logs' of …
thiagohora Jan 17, 2025
b43bfa0
Merge branch 'main' into thiagohora/OPIK-796_implement_clickhouse_use…
andrescrz Jan 20, 2025
a400485
[OPIK-796] Implement get log API
thiagohora Jan 20, 2025
357be97
Address PR comments
thiagohora Jan 20, 2025
0135816
Merge branch 'main' into thiagohora/OPIK-796_implement_clickhouse_use…
thiagohora Jan 20, 2025
5a2e109
Fix tests
thiagohora Jan 20, 2025
f9245b1
Extract DAO from log appender
thiagohora Jan 20, 2025
2815348
Merge branch 'main' into thiagohora/OPIK-796_implement_clickhouse_use…
thiagohora Jan 20, 2025
fa8e002
Merge branch 'thiagohora/OPIK-796_implement_clickhouse_user_logs' int…
thiagohora Jan 20, 2025
49d1ae4
Address PR review
thiagohora Jan 20, 2025
6ba985b
Merge branch 'main' into thiagohora/OPIK-796_implement_get_log_api
thiagohora Jan 20, 2025
9424a28
Merge branch 'main' into thiagohora/OPIK-796_implement_get_log_api
thiagohora Jan 21, 2025
e466b80
Merge branch 'main' into thiagohora/OPIK-796_implement_get_log_api
thiagohora Jan 21, 2025
b9476b6
Make LLM Providers configurable via tests and add judge scorer to app…
thiagohora Jan 21, 2025
48afa67
Merge branch 'thiagohora/OPIK-796_implement_get_log_api' of https://g…
thiagohora Jan 21, 2025
57f232e
Fix references
thiagohora Jan 21, 2025
df6a3df
Fix log message
thiagohora Jan 22, 2025
7633e65
Reuse DAO
thiagohora Jan 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix marker field ingestion
thiagohora committed Jan 17, 2025
commit 22feff1fcc45120db7de6d81bade9c773c781e4d
Original file line number Diff line number Diff line change
@@ -28,18 +28,18 @@
class ClickHouseAppender extends AppenderBase<ILoggingEvent> {

private static final String INSERT_STATEMENT = """
INSERT INTO automation_rule_evaluator_logs (timestamp, level, workspace_id, rule_id, message, extra)
INSERT INTO automation_rule_evaluator_logs (timestamp, level, workspace_id, rule_id, message, markers)
VALUES <items:{item |
(
parseDateTime64BestEffort(:timestamp<item.index>, 9),
:level<item.index>,
:workspace_id<item.index>,
:rule_id<item.index>,
:message<item.index>,
mapFromArrays(:extra_keys<item.index>, :extra_values<item.index>)
)
<if(item.hasNext)>,<endif>
}>
(
parseDateTime64BestEffort(:timestamp<item.index>, 9),
:level<item.index>,
:workspace_id<item.index>,
:rule_id<item.index>,
:message<item.index>,
mapFromArrays(:marker_keys<item.index>, :marker_values<item.index>)
)
<if(item.hasNext)>,<endif>
}>
;
""";

@@ -125,8 +125,8 @@ private void flushLogs() {
.bind("workspace_id" + i, workspaceId)
.bind("rule_id" + i, ruleId)
.bind("message" + i, event.getFormattedMessage())
.bind("extra_keys" + i, new String[]{"trace_id"})
.bind("extra_values" + i, new String[]{traceId});
.bind("marker_keys" + i, new String[]{"trace_id"})
.bind("marker_values" + i, new String[]{traceId});
}

return statement.execute();