Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
84 changes: 48 additions & 36 deletions collector.example.yaml
Original file line number Diff line number Diff line change
@@ -1,50 +1,62 @@
# Configuration for AI Engineering Metrics pipeline
# This file follows the current schema where everything is organized into pipelines
# AI Engineering Metrics Collector Configuration Example
# This example shows how to collect Claude usage metrics and AI readiness metrics

pipelines:
- # Pipeline 1: Main AI metrics collection pipeline
# Pipeline 1: Claude Usage Metrics with User Filtering
- users:
type: getdx
config:
api_key: ${env.GETDX_WEB_API_KEY}
collectors:
- name: bedrock-s3 # of the tool as it appears in GetDX
- name: claude
type: bedrock
enabled: true
config:
bucket: my-bedrock-logs-bucket
prefix: bedrock-logs/
# local_path: /tmp/bedrock-logs # Optional: local directory for temporary file storage
prefix: AWSLogs/123456789012/BedrockModelInvocationLogs/us-east-1/
costs:
region: us-east-1
discount: 0%
user_mapping:
type: regex
config:
regex: "arn:aws:sts::123456789012:assumed-role/MyRole/(.*@company.com)"
replacement: "$1"
publishers:
- type: getdx
config:
api_base_url: https://api.getdx.com
api_token: ${env.GETDX_API_KEY}
tools:
- claude

# Pipeline 2: AI Readiness Metrics (no user filtering needed)
- collectors:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

maybe I'm wrong but I don't see ai_indicators

- name: github-ai-readiness
type: github
enabled: true
config:
app_id: ${env.GITHUB_APP_ID}
private_key: ${env.GITHUB_PRIVATE_KEY}
scan_all_organizations: true
organization_filter:
- "my-org"
user_mapping:
type: passthrough
config: {}
# Alternative user mapping options:
# type: static
# config:
# session-123: user@example.com
# session-456: another@example.com
# type: regex
# config:
# regex: 'session-(.+)'
# replacement: 'user-$1@example.com'

publishers:
- name: getdx
type: getdx
enabled: true
- type: getdx-ai-enabled-repos
config:
api_url: https://api.getdx.com/v1/metrics
api_key: ${GETDX_API_KEY}
api_base_url: https://api.getdx.com
api_token: ${env.GETDX_API_KEY}
tools:
- claude

# User filtering configuration
users:
type: static
config:
user_ids:
- user@example.com # Include specific users
- admin@example.com
- service-account-123
# Add more user IDs as needed
# Alternatively, use GetDX API to get the list of users
# type: getdx
# config:
# api_key: ${GETDX_WEB_API_KEY}
- ai-readiness
- ai-readiness-summary

# Alternative user filtering options for Pipeline 1:
# users:
# type: static
# config:
# user_ids:
# - user1@company.com
# - user2@company.com
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ require (
github.com/go-playground/validator/v10 v10.27.0 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/goccy/go-yaml v1.18.0 // indirect
github.com/golang-jwt/jwt/v5 v5.3.1 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/cpuid/v2 v2.3.0 // indirect
Expand All @@ -64,6 +65,7 @@ require (
golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc // indirect
golang.org/x/mod v0.25.0 // indirect
golang.org/x/net v0.42.0 // indirect
golang.org/x/oauth2 v0.34.0 // indirect
golang.org/x/sys v0.35.0 // indirect
golang.org/x/text v0.27.0 // indirect
golang.org/x/tools v0.34.0 // indirect
Expand Down
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU=
github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
github.com/goccy/go-yaml v1.18.0 h1:8W7wMFS12Pcas7KU+VVkaiCng+kG8QiFeFwzFb+rwuw=
github.com/goccy/go-yaml v1.18.0/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA=
github.com/golang-jwt/jwt/v5 v5.3.1 h1:kYf81DTWFe7t+1VvL7eS+jKFVWaUnK9cB1qbwn63YCY=
github.com/golang-jwt/jwt/v5 v5.3.1/go.mod h1:fxCRLWMO43lRc8nhHWY6LGqRcf+1gQWArsqaEUEa5bE=
github.com/google/cel-go v0.26.1 h1:iPbVVEdkhTX++hpe3lzSk7D3G3QSYqLGoHOcEio+UXQ=
github.com/google/cel-go v0.26.1/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM=
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
Expand Down Expand Up @@ -122,6 +124,8 @@ golang.org/x/mod v0.25.0 h1:n7a+ZbQKQA/Ysbyb0/6IbB1H/X41mKgbhfv7AfG/44w=
golang.org/x/mod v0.25.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww=
golang.org/x/net v0.42.0 h1:jzkYrhi3YQWD6MLBJcsklgQsoAcw89EcZbJw8Z614hs=
golang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8=
golang.org/x/oauth2 v0.34.0 h1:hqK/t4AKgbqWkdkcAeI8XLmbK+4m4G5YeQRrmiotGlw=
golang.org/x/oauth2 v0.34.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA=
golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I=
golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
Expand Down
2 changes: 2 additions & 0 deletions pkg/collector/collectors.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ func NewCollector(cfg CollectorConfig, userList users.UsersList) (Collector, err

c := NewBedrockCollector(s3Client, localPath, bucketName, prefix, cfg.Name, mapper, userList)
return c, nil
case "github":
return NewGitHubCollector(cfg, userList)
default:
return nil, fmt.Errorf("unknown collector type: %s", cfg.Type)
}
Expand Down
Loading