-
Notifications
You must be signed in to change notification settings - Fork 11
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
stats: add explicit filter of robots needed for migrated events #255
Merged
zzacharo
merged 1 commit into
CERNDocumentServer:master
from
zzacharo:add-filter-robots-for-legacy-stats
Dec 19, 2024
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# -*- coding: utf-8 -*- | ||
# | ||
# Copyright (C) 2024 CERN. | ||
# | ||
# CDS-RDM is free software; you can redistribute it and/or modify it under | ||
# the terms of the MIT License; see LICENSE file for more details. | ||
|
||
"""CDS-RDM Statistics search index templates.""" |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# -*- coding: utf-8 -*- | ||
# | ||
# Copyright (C) 2024 CERN. | ||
# | ||
# CDS-RDM is free software; you can redistribute it and/or modify it under | ||
# the terms of the MIT License; see LICENSE file for more details. | ||
|
||
"""CDS-RDM Statistics search index templates.""" |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# -*- coding: utf-8 -*- | ||
# | ||
# Copyright (C) 2024 CERN. | ||
# | ||
# CDS-RDM is free software; you can redistribute it and/or modify it under | ||
# the terms of the MIT License; see LICENSE file for more details. | ||
|
||
"""Statistics events search index templates.""" |
8 changes: 8 additions & 0 deletions
8
site/cds_rdm/stats/templates/events/file_download/__init__.py
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# -*- coding: utf-8 -*- | ||
# | ||
# Copyright (C) 2024 CERN. | ||
# | ||
# CDS-RDM is free software; you can redistribute it and/or modify it under | ||
# the terms of the MIT License; see LICENSE file for more details. | ||
|
||
"""File download event search index templates.""" |
8 changes: 8 additions & 0 deletions
8
site/cds_rdm/stats/templates/events/file_download/os-v2/__init__.py
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# -*- coding: utf-8 -*- | ||
# | ||
# Copyright (C) 2024 CERN. | ||
# | ||
# CDS-RDM is free software; you can redistribute it and/or modify it under | ||
# the terms of the MIT License; see LICENSE file for more details. | ||
|
||
"""File download event OpenSearch index templates.""" |
104 changes: 104 additions & 0 deletions
104
site/cds_rdm/stats/templates/events/file_download/os-v2/file-download-v1.0.0.json
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 |
---|---|---|
@@ -0,0 +1,104 @@ | ||
{ | ||
"index_patterns": ["__SEARCH_INDEX_PREFIX__events-stats-file-download-*"], | ||
"settings": { | ||
"index": { | ||
"refresh_interval": "5s" | ||
} | ||
}, | ||
"mappings": { | ||
"dynamic_templates": [ | ||
{ | ||
"date_fields": { | ||
"match_mapping_type": "date", | ||
"mapping": { | ||
"type": "date", | ||
"format": "strict_date_hour_minute_second" | ||
} | ||
} | ||
} | ||
], | ||
"date_detection": false, | ||
"dynamic": "strict", | ||
"numeric_detection": false, | ||
"properties": { | ||
"timestamp": { | ||
"type": "date", | ||
"format": "strict_date_hour_minute_second" | ||
}, | ||
"bucket_id": { | ||
"type": "keyword" | ||
}, | ||
"file_id": { | ||
"type": "keyword" | ||
}, | ||
"file_key": { | ||
"type": "keyword" | ||
}, | ||
"unique_id": { | ||
"type": "keyword" | ||
}, | ||
"country": { | ||
"type": "keyword" | ||
}, | ||
"visitor_id": { | ||
"type": "keyword" | ||
}, | ||
"is_machine": { | ||
"type": "boolean" | ||
}, | ||
"is_robot": { | ||
"type": "boolean" | ||
}, | ||
"unique_session_id": { | ||
"type": "keyword" | ||
}, | ||
"size": { | ||
"type": "double" | ||
}, | ||
"referrer": { | ||
"type": "keyword" | ||
}, | ||
"ip_address": { | ||
"type": "keyword" | ||
}, | ||
"user_agent": { | ||
"type": "keyword" | ||
}, | ||
"user_id": { | ||
"type": "keyword" | ||
}, | ||
"session_id": { | ||
"type": "keyword" | ||
}, | ||
"record_id": { | ||
"type": "keyword" | ||
}, | ||
"recid": { | ||
"type": "keyword" | ||
}, | ||
"parent_id": { | ||
"type": "keyword" | ||
}, | ||
"parent_recid": { | ||
"type": "keyword" | ||
}, | ||
"via_api": { | ||
"type": "boolean" | ||
}, | ||
"is_lcds": { | ||
"type": "boolean", | ||
"description": "This field marks all statistical events that have been migrated from the legacy CDS system." | ||
}, | ||
"before_COUNTER": { | ||
"type": "boolean", | ||
"description": "This field applies to all migrated events where no information was available to determine whether they were human or robot events. This was later resolved with the implementation of a proper robot-checking mechanism, ensuring COUNTER compliance." | ||
}, | ||
"updated_timestamp": { | ||
"type": "date" | ||
} | ||
} | ||
}, | ||
"aliases": { | ||
"__SEARCH_INDEX_PREFIX__events-stats-file-download": {} | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# -*- coding: utf-8 -*- | ||
# | ||
# Copyright (C) 2024 CERN. | ||
# | ||
# CDS-RDM is free software; you can redistribute it and/or modify it under | ||
# the terms of the MIT License; see LICENSE file for more details. | ||
|
||
"""Record views search index templates.""" |
8 changes: 8 additions & 0 deletions
8
site/cds_rdm/stats/templates/events/record_view/os-v2/__init__.py
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# -*- coding: utf-8 -*- | ||
# | ||
# Copyright (C) 2024 CERN. | ||
# | ||
# CDS-RDM is free software; you can redistribute it and/or modify it under | ||
# the terms of the MIT License; see LICENSE file for more details. | ||
|
||
"""Record view event OpenSearch index templates.""" |
84 changes: 84 additions & 0 deletions
84
site/cds_rdm/stats/templates/events/record_view/os-v2/record-view-v1.0.0.json
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 |
---|---|---|
@@ -0,0 +1,84 @@ | ||
{ | ||
"index_patterns": ["__SEARCH_INDEX_PREFIX__events-stats-record-view-*"], | ||
"settings": { | ||
"index": { | ||
"refresh_interval": "5s" | ||
} | ||
}, | ||
"mappings": { | ||
"date_detection": false, | ||
"dynamic": "strict", | ||
"numeric_detection": false, | ||
"properties": { | ||
"timestamp": { | ||
"type": "date", | ||
"format": "strict_date_hour_minute_second" | ||
}, | ||
"labels": { | ||
"type": "keyword" | ||
}, | ||
"country": { | ||
"type": "keyword" | ||
}, | ||
"visitor_id": { | ||
"type": "keyword" | ||
}, | ||
"is_machine": { | ||
"type": "boolean" | ||
}, | ||
"is_robot": { | ||
"type": "boolean" | ||
}, | ||
"unique_id": { | ||
"type": "keyword" | ||
}, | ||
"unique_session_id": { | ||
"type": "keyword" | ||
}, | ||
"referrer": { | ||
"type": "keyword" | ||
}, | ||
"ip_address": { | ||
"type": "keyword" | ||
}, | ||
"user_agent": { | ||
"type": "keyword" | ||
}, | ||
"user_id": { | ||
"type": "keyword" | ||
}, | ||
"session_id":{ | ||
"type": "keyword" | ||
}, | ||
"record_id": { | ||
"type": "keyword" | ||
}, | ||
"recid": { | ||
"type": "keyword" | ||
}, | ||
"parent_id": { | ||
"type": "keyword" | ||
}, | ||
"parent_recid": { | ||
"type": "keyword" | ||
}, | ||
"via_api": { | ||
"type": "boolean" | ||
}, | ||
"is_lcds": { | ||
"type": "boolean", | ||
"description": "This field marks all statistical events that have been migrated from the legacy CDS system." | ||
}, | ||
"before_COUNTER": { | ||
"type": "boolean", | ||
"description": "This field applies to all migrated events where no information was available to determine whether they were human or robot events. This was later resolved with the implementation of a proper robot-checking mechanism, ensuring COUNTER compliance." | ||
}, | ||
"updated_timestamp": { | ||
"type": "date" | ||
} | ||
} | ||
}, | ||
"aliases": { | ||
"__SEARCH_INDEX_PREFIX__events-stats-record-view": {} | ||
} | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we will need to remember on the deployment too? should we note it down somewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you mean update of the mapping? I will do it yes