Recommended Workflow
Discuss with your team and product leads thoroughly before deciding which endpoint and codepoints to log. Restrict and track only endpoints and code-blocks which are important. More data does not mean better data.
Create a json/csv file and map endpoint function names to endpoint IDs. This is more important for code blocks are they will usually be more in number.
For code IDs, follow one of two approaches
For functions common across many endpoints, give each tracked code-block a unique ID. For each endpoint, for all functions specific to that endpoint, give a unique code ID (which does not conflict with common function code IDs)
Create a unique ID for each code block across your code. This could be easier to maintain and track over time.
Implement the tracking mechanism in one-shot so as to keep the process simple.
Analyze your data at a weekly and monthly basis to check how your products are performing.
Email: insightsoncode@gmail.com