You can use manual instrumentation to create spans for code you would like to monitor. How to perform manual instrumentation for Node.js agent is explained here.
For example let's say that you have functions with different versions and you need to query a specific version.You can add application tag version as key and value as a string value, say "1.2.1". Environment variable for this should be as follows:
Then, on the query bar on Function List page you can search with that filter:
If you want to search invocations on some label, you can add invocations tags as in the example here. For our example above with version the line we set tag should be as follows:
Then search on the query bar on Function Details page with that filter as in the following:
You can use sampling described in here. With configuring intelligent sampling, you can sample your data without losing interesting data. You can also have a look at this blog to have more information about intelligent sampling.