define entrypoint
Add support to include PID in metric name
Make more efficient