- Notifications
You must be signed in to change notification settings - Fork 147
Closed
Labels
Description
Versions
VueApm-Plugin (RUM-Agent): ^2.0.1
Vue: ^3.0.0
Problem
I am not able to use your fantastic Apm-Plugin inside a Vue3-<script setup>-Component because of the missing provide mechanism.
In order to make this possible the plugin itself needs to use the inject mechanism:
Solution
APM-Plugin
export default { install: (app, options) => { const $apm = () => { ... }; app.provide("$apm", $apm); } };
Then I can use it inside my Setup-Template
<script setup> import { inject } from "vue"; const $apm = inject("$apm"); </setup>
Would be nice if you can implement the support for Vue3-Setup-Templates.
Thanks 🙏