Skip to content

Update py-spy to differentiate between archive.org and internal requests #11279

@mekarpeles

Description

@mekarpeles

Feature Request

https://github.com/internetarchive/openlibrary/blob/master/scripts/monitoring/utils.sh#L62-L73

Problem / Opportunity

How to run py-spy: on ol-web[0-2]
docker exec -it openlibrary-monitoring bash
source scripts/monitoring/utils.sh

for pid in $(ps aux | grep -E 'openlibrary-server|coverstore-server' | grep -v 'grep' | awk '{print $2}'); do
        echo "$pid $(py_spy_cur_fn $pid)";
    done 2>/dev/null \
        | awk '{$1=""; print}' \
        | awk '{
            if ($2 ~ /solr\.py/) print "solr_py";
            else if ($1 ~ /^(connect|sleep|wait|getaddrinfo|create_connection|get_availability|get_api_response)$/) print $1;
            else print "other"
        }' \
        | sort \
        | uniq -c

Proposal

Breakdown

Related files

Refer to this map of common Endpoints:
*

Requirements Checklist

Checklist of requirements that need to be satisfied in order for this issue to be closed:

  • [ ]

Stakeholders


Instructions for Contributors

Metadata

Metadata

Assignees

No one assigned

    Labels

    Lead: @cdriniIssues overseen by Drini (Staff: Team Lead & Solr, Library Explorer, i18n) [managed]Needs: BreakdownThis big issue needs a checklist or subissues to describe a breakdown of work. [managed]Priority: 2Important, as time permits. [managed]Type: Feature RequestIssue describes a feature or enhancement we'd like to implement. [managed]

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions