Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

Add real model name to Eloquent integration #229

Open
eggnaube opened this issue Mar 21, 2019 · 0 comments
Open

Add real model name to Eloquent integration #229

eggnaube opened this issue Mar 21, 2019 · 0 comments

Comments

@eggnaube
Copy link

Add real model name to Eloquent integration, instead of the base class name.

// protected function performInsert(Builder $query)
opencensus_trace_method(Model::class, 'performInsert', function ($model, $query) {
	return [
    	'name' => get_class($model) . '::performInsert',
        'attributes' => [
        	'query' => $query->toBase()->toSql()
        ],
        'kind' => Span::KIND_CLIENT
    ];
});

If you wish, i could open a PR with the changes, including tests.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant