newrelic-experimental / newrelic-nextjs-integration

NewRelic Browser and APM agent NextJs integration (front and back-end respectively)
Apache License 2.0
28 stars 22 forks source link

added getStaticProps to a page to have a SSG example #9

Closed bizob2828 closed 1 year ago

bizob2828 commented 1 year ago

This PR adds a getStaticProps method to the index page to show an example of a SSG page. This also adds more logic to pages/_document.tsx to wait for agent to be connected before getting the browser timing header. This was discovered as an issue while testing out a fix to getBrowserTimingHeader that supports running when not in a transaction context. See PR here

bizob2828 commented 1 year ago

I forgot to mention this wasn't ready. We haven't released the agent version that provides this capability. It will probably be released Tuesday January 17th and Monday is a holiday in the US